Custom Grindstone Recipes?

Started by Mindthemoods on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 10:38, 22. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom Grindstone Recipes?
Tue, 08/02/2022 - 23:14 (edited)

Wondering if there's a way to make custom recipes with the grindstone- specifically, I'm adding a new system that allows players to add modifications to tools using the smithing table, and was hoping I could allow modifications to be removed via. the grindstone; custom code or otherwise. Some other possible solutions I came up with:

-Remove grindstones from the game by replacing the recipe product with a custom grindstone block with the functionality I need. (Grindstone still generate naturally in villages though, and my custom grindstones wouldn't have village occupation setting functionality.)

-Replace the Grindstone GUI with my own custom GUI with the desired functionality. (Not sure how well this would work, but it could be a possibility.)

Edited by Mindthemoods on Tue, 08/02/2022 - 23:14
Last seen on 10:38, 22. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can confirm that replacing…
Tue, 08/02/2022 - 23:53

I can confirm that replacing the GUI works pretty well- a simple procedure that waits a tick then opens the custom GUI can do it, though this does cause a brief flash of the old one. (Again, not a problem if I copy the existing Grindstone GUI exactly, or remove it via. a resource pack or something.) In fact, this might actually work better, as it means I can use custom tags instead of doing every recipe individually.

...It still could be helpful to have a template for Grindstone recipes- or the option to block specific GUIs, I guess. And I am still curious if there's a solution for this.

Last seen on 03:50, 24. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Would it make sense to…
Thu, 11/03/2022 - 13:51

Would it make sense to really re-create the entire grindstone GUI?
You have to make it so you can still normally dis-enchant items like the actual grindstone, and make your own recipes. Too hard?

I dont really have any solutions for this besides adding a new grindstone with the GUI installed.

Last seen on 10:38, 22. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It wasn't as difficult as I…
Thu, 11/03/2022 - 14:31

It wasn't as difficult as I expected, to be honest. I used the existing GUI as a template, (you can find all of minecraft's assets at MC Assets, if you don't want to dig through your own files), then just made it appear whenever the grindstone was rightclicked on top of the existing one. From there, I just made 'recipes' by having it destroy the item in the input slot, output the correct item in the output slot, and drop some EXP if the item is enchanted.

The key to the recipes thing is there's an easy way to save time too. My mod adds literal hundreds of custom modified tools and equipment and stuff; so I just use tags to determine which items have which base item. (All the modified diamond swords are tagged in the 'diamond swords' category, etc.) Depending on the tag of the item in the input slot, it gives a different base item, (unmodified and unenchanted), in the output slot.

Getting it to be compatible with non-modified vanilla items was, ironically, something I forgot until someone pointed it out. I literally just had to add the vanilla items to their respective tags.