Started by
Awesomex_Revived
on
Topic category: Help with Minecraft modding (Java Edition)
I made a compression unit that takes 1 iron from the input slot and turns it into 1 steel plate in the output slot.
The procedure sets the local variable, 'number_of_iron' to the number of iron in slot 00 (input slot), then sets [number_of_iron] steel plates in slot 01 (output slot), then clears slot 00, plays a sound and awards xp. Here's a screenshot of the procedure:
However, when I input iron, it plays the sound, awards exp, but does not clear slot 0 or place any steel into the output slot. Anyone got any advice, or even better, a fix?
Sorry, i'm not that good with the block interface thing >.<
-Awesomex
Edited by Awesomex_Revived on Wed, 08/14/2019 - 07:57
This is not how you make a gui.
You need to "bind GUI to block"
and you don't need to use "GUI procedures". Use block procedures instead.
e.x:
if( [get slot from slot 0 if it has inventory=iron] AND [get number of items in slot 1 if it has inventory=zero or get item from slot 1 if it has inventory=steel] ) do {
set item in slot 1 if it has inventory= get number of items in slot 1 if it has inventory+1 // if you want to smelt 1 iron per steel
}
// <-- part is explanation
thank you jesus
do you understand now?
Wait... I can't find the, "Get slot from slot." block or the, "get number of items in slot 1" blocks anywhere in the list of any category. I'm using MCreator 1.9.0, why?
In Block procedures
And its get item in slot (yer slot) from block (yer block x coordinate) (yer block y coordinate) (yer block z coordinate)
It works, but there's one last problem.
In order for the steel to appear, I first have to left click the output slot, or take the iron out of the input slot. Only then will the steel actually appear in the output slot. Here's my code:
(https://imgur.com/a/evT2dUo)
(I had to do it a tiny bit different from your code, since certain things were missing or I couldn't find them, I'm using v1.9.0 MCreator).
edit to it works, but there's one last problem.
Your replies did not display to me until after I did the code, I still couldn't get it to display as soon as the iron went in like a normal crafting table or furnace.
Bind this procedure to 'tick update'
then it will work(hopefully)
I can do a tutorial forum on this if u want.
And your images are not displaying bc you did the link to the image page, but not the actual image.
to do that, right click(or left/right click on the same time if you are on mac without a mouse) the image and click open image in new tab. Then copy the link there and put it in.
You should probably make the tutorial as it would help me, but not only me, it would also save many people from youtubers screaming about things.
Note: Where is the bind procedure to tick update button?
I'll show you later as I'm on mobile
Hi
Go to the second last page of your block, and there is a bunch of triggers
put the one that opens your GUI to "When Block Right Clicked"
and the one that crafts steel to "Tick Update"