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

Started by Awesomex_Revived on Wed, 08/14/2019 - 00:59

Topic category: Help with MCreator modding

Last seen on 08:31, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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
Last seen on 13:50, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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

Last seen on 08:31, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
thank you jesus
Wed, 08/14/2019 - 01:46

thank you jesus

Last seen on 13:50, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
do you understand now?
Wed, 08/14/2019 - 01:55

do you understand now?

Last seen on 08:31, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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?

Last seen on 13:50, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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)

Last seen on 13:50, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
(No subject)
Wed, 08/14/2019 - 03:27

this

Last seen on 08:31, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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).

Last seen on 08:31, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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.

Last seen on 13:50, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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.

 

Last seen on 13:50, 18. Aug 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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.