This procedure looks right but does not work. Anyone know why?

Started by Awesomex_Revived on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This procedure looks right but does not work. Anyone know why?
Wed, 08/14/2019 - 07:57 (edited)

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:

 

Procedure (https://imgur.com/a/WDJfvt5)

 

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
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is not how you make a…
Wed, 08/14/2019 - 01:14

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

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wait... I can't find the, …
Wed, 08/14/2019 - 02:37

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?

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In Block procedures And its…
Wed, 08/14/2019 - 03:24

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)

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It works, but there's one…
Wed, 08/14/2019 - 04:01

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: 

Procedure (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).

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
edit to it works, but there…
Wed, 08/14/2019 - 04:05

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.

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Bind this procedure to 'tick…
Wed, 08/14/2019 - 04:25

Bind this procedure to 'tick update' 

then it will work(hopefully)

I can do a tutorial forum on this if u want.

 

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And your images are not…
Wed, 08/14/2019 - 04:27

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.

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You should probably make the…
Wed, 08/14/2019 - 04:37

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?

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi Go to the second last…
Thu, 08/15/2019 - 09:40

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"