2x1 crafting table

Started by manuPolar22 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
2x1 crafting table

Could someone tell me how to create a crafting table with 2 crafting slots

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You would first need to…
Tue, 11/14/2023 - 15:01

You would first need to create your own custom block. Then, you would make a procedure, which, when right clicked, opens a custom GUI. (You would want to make an inventory GUI, with two input slots, and one output slot.) If you want the crafting table to be able to hold items, you would also need to enable block entity and inventory; otherwise the items will be returned to the player when the GUI is closed.

The difficult part is getting the GUI to work. You need one procedure that triggers whenever an item is removed from the output slot, which shrinks the itemstacks in the input slots by one. You also need a procedure to check the items in each of the input slots, and if they form a recipe, place the result item in the output slot. (Though if you only have two slots to worry about, this should be pretty straightforward.) It might be worth checking out a NorthWestTrees tutorial to get a better idea of how you'd set this up.