Tutorial: Custom crafting machine block

Published by Matej on Sun, 06/10/2018 - 19:31
MCreator Tutorial - Using procedures for a custom crafting block

As the answer to multiple requests, we made a tutorial on how to create a fully operational custom crafting block using the MCreator's new procedure system.

This kind of tutorial was the most requested one since the release of the procedure system that allowed doing such modifications. In this video, you will learn how to:

  • Create a block with its own inventory
  • Implement your own crafting procedure
  • Design a GUI for crafting-table-like blocks
  • Open a GUI using the procedures

The modification introduces a new crafting-table-like block which can be used for fusing Redstone Dust, Diamonds and Gold with Iron Blocks. You put 1 iron block in the top left slot and one of the 3 materials to create Red Iron, Diamond Blocks or Gold Blocks.


The mod and its workspace file can be downloaded on the modification's page.




You can find some more examples and help with procedures on our procedure system reference wiki page. If you have any questions or recommendations, leave a comment in the comment section below. Stay tuned!

Share this on:


I found the mod a few minutes ago but I didn't even notice it was made by Matej
Then I go to MCreator home and I see this article and I say: what, was that mod made by mcreator developers? And was it a tutorial mod?
You are really doing a great work on procedures tutorials! :D

Can I just ask why the "when item added to slot" trigger doesn't provide the "block" dependency? I'm trying to make a combination lock that works by having the player put four items in slots, and then testing whether the four slots in the other GUI (the one for attempting the combination) contain the same item/block. If true, the lock will provide power. But telling a block to provide power requires the "block" dependency, which said trigger does not provide.

Block dependency is not the same as itemstack that can be obtained from slot. Unfortunately, you can't do this this way. You could create a global variable, control redstone power using update tick trigger in block to set the power based on the variable and set the variable from the slot based on the contents of the slot in the GUI.

If you could bind 2 guis to a single block, you could make a block with 8 slots of inventory that when right-clicked with nothing in hand will open its gui for attempting the combination, while when right-clicked with a specific item in the hand (for example a key) it would open the gui for choosing the combination. A simple tick rate procedure would check if items in slot 0,1,2,3 are the same in slot 4,5,6,7 and if yes, send a redstone signal (this means that if the inventory of the block is empty, it will give redstone signal too)
Unfortunately I don't think that you can bind 2 guis to a single block :(
(Sorry for bad English)

Ooooohhh. I freaking love the video. It's very informative and amazing.

Hmm... I think I have an idea. :D :)

If I want it to have more than two input slots, I can simply put another if with all the and/or after the first one ?

I have a few questions that I always forgot to ask:
1- For custom mobs drop, can we just go to Mcreator\forge\src\main\resources\assets\minecraft and edit loot tables?
2- When making a recipe (by the recipe mod element) , you can choose to add a smelting or a crafting recipe. Can I add both of them? Can they have different outputs?
3- I tried to edit splashes by Mcreator\forge\src\[...] folder but it doesn't seem to work. Why? :(

1 - this could work. Custom mob drops can also be defined in mob creation wizard, more specific drops can be defined using procedure editor.
2 - Yes, you can add both of them, with different outputs.
3 - I am not sure but they might get ignored by Minecraft. Or there is another trick. I never tried doing this so someone else will have to give you a more correct answer to this question.

I followed this directory and I am curious as to how you define the loot tables? if your trying to change the drops from vanilla mobs then how do you connect the new drops to the mobs? Thanks Klemen and Raol. Also does changing the mobs drops cause any problems in the sense of legality cause? Before I would have assumed changing vanilla drops meant the coding as well, but I am not that naive now being older. hahha.

I've heard of loot tables only recently (well, while editing some textures i found a folder called "loot tables" and I opened it XD) so I don't know how do they work, I should look on the Minecraft Wiki. Anyway, I think that since loot tables are a folder inside minecraft assets, they work just like do textures and sounds do and they are completely legal, because if they weren't Mojang wouldn't have added them in the same folder where are stored textures and songs. I think that they were made for custom maps.

Klemen, can I ask you another question?
When making schematics, do we need to make them with Mcreator runclient or with minecraft? I mean, when using Mcreator runclient, the id of the blocks is TestEnvironmentMod:blockid, while when using minecraft with the exported mod, it's modname:blockid, so I don't know if Mcreator automatically turns TestEnvironmentMod into modname or not.
Sorry for bad English

MCreator automatically changes all strings of TestEnvironmentMod with the mod name when exporting. We will drop the TestEnvironmentMod system in MCreator 2.x.x and replace it so that the name of the mod will be set on the creation point of the workspace and will be consistent when developing and when exporting. This will solve many frustrations and hidden bugs.

Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.