How to make knapping-like recipe type?

Started by Qudori on

Topic category: Help with modding (Java Edition)

Last seen on 18:25, 31. Jan 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make knapping-like recipe type?

I want to make a Crafting GUI similar to Knapping from TerraFirmaCraft for my mod. Unfortunately, I do not know how this system works in TFC. After looking through a bunch of guides on the Internet, I found only ways to create various GUIs where you need to put things in slots or press buttons made using procedures. I wanted to try to do this with a lot of buttons, but I can't put a texture on them and it looks very strange. 

My other guess is just a lot of itemslots with plug items that look like a rock. If I do it this way, then two questions arise: 

1. Is it possible to apply a texture to the slot itself so that when removing an object from it, it is not visible? (or darker, like clay craft's) And if it can be done, then how? 

2. When a player pulls an item out of the slot and holds it with the cursor - can it be removed immediately and how?

Last seen on 18:22, 4. Jan 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Does this image help you any…
Tue, 02/21/2023 - 19:44

Does this image help you any?

https://imgur.com/a/EZXx9T0

Create an 18x18 image and fill it with hex code C6C6C6 to make an image you can cover slots in an inventory with to hide the slot texture. That should answer question 1.

As for question 2, using a procedure to execute a command whenever a slot's contents change to execute /clear @s example:name to remove that item used to represent the filled slot. That should work.