Started by MahdiGamer145 on Sat, 06/02/2018 - 13:04
Topic category: General discussion
Ummm I am very new and I am having difficulties with procedures and gui's and so can u guys tell me how can I make custom furnace.
Edited by MahdiGamer145 on Sat, 06/02/2018 - 13:05
You can make a new furnace but you can't make it wait for cook things because local variables reset every tick and global variables are world-dependent.
To make everything easier, I'll cal procedure blocks (the ones like "place block", "explode" or "set gamemode") "events".
1-Make a block (furnace)
2-Add inventory to it (3 slots)
3-Make a GUI. Bind it to the custom furnace block you made using its inventory
4-Add 2 input slots and an output slot to the GUI. If you want, add some images (an arrow and a fire maybe)
5-Make a procedure. Add this event: "Open provided GUI to the provided player: (the GUI that you made for the furnace)" (I don't remember well the name of the events that opens the gui)
6-Edit your block. Go to "when block right-clicked" and add your procedure there
Part 2 of the comment coming soon (the page can reload and I don't want to write everything again)
7- Add another procedure.
(don't use GUI events for this, only block modifications)
Add these events
(get number of items from slot 2 of block at x, y, z if it has got inventory < 64)
[(get item from slot 0 of block at x, y, z if it has got inventory == minecraft component (choose the item/block to smelt and be sure to use the minecraft component with both the arrow and the cube images in it) AND (get item from slot 1 of block at x, y, z if ut has got inventory == minecraft component (choose the fuel, it can be a custom item or a Minecraft item)
[(get item from slot 2 of block at x, y, z if it has got inventory == minecraft component (air)) OR (get item from slot 2 of block at x, y, z if it has got inventory == minecraft component (the item that you get when smelting)
Set items ( (get number of items in slot 2 of block at x, y, z) + (1) ) to slot 2 of block at x, y, z it it has got inventory (the item that you get when smelting)
Remove 1 item from slot 0 of block at x, y, z if it has got inventory
Remove 1 item from slot 1 of block at x, y, z if it has got inventory
PART 3 COMING SOON
8- Link this procedure to the "on block tick" event.
If you want you can make the tick rate bigger so the process is slower (the tick rate by default is 20,so 1 second because 20 ticks = 1 second)
9- if you want that your block can smelt more things just copy all the stuff of the second procedure and change the items in the minecraft component
If you want you can see Pylo's last mcreator video that shows some very useful tips on procedures like this
I hope it was useful
Sorry for bad English and bad explanation :(
How do you change the block tick rate?
Nevermind I was being blind
You seem pretty knowledgable. Is there a way i can change the furnace skin so if the inventory is exitied you can see it smelting? Also, although less important, can the fire and arrow be animated in the furnace inventory?
Hey just wondering did you get an answer for this? If you watch this video he shows it at 7:54