How do I make a basic 1 input and 1 output trade.

Started by ZenTheDev on Tue, 07/14/2020 - 18:57

Topic category: Help with modding (Java Edition)

Last seen on 23:16, 12. Apr 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I make a basic 1 input and 1 output trade.
Tue, 07/14/2020 - 18:57

I want to be able to insert a certain amount of material into an input slot, and then have the same amount of stuff in that input slot come out of the output slot as a different material

so this:

|----------------|

|  wood x27  |       ----->    logs x27

|__________|

 

And then I want to be able to retrieve it and have the contents of the input slot removed without the gui glitching then taking away the outputted amount of logs you received.

As far as I know there does not seem to be any templates made of this and, it is surprisingly much more difficult to make then expected.

So how would I make this? I have already tried multiple times and failed miserably.

Last seen on 14:47, 11. Jun 2021
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This is a small procedure I…
Tue, 07/14/2020 - 21:09

This is a small procedure I made for you.
The goal is to create your trading block, then you create your GUI with 2 slots : 1 input slot with ID 0 and 1 output slot with ID 1
Then, you link your GUI to your block and activate your block's TileEntity option in your trading block's settings.
Still in your trading block's setting, you link the procedure to the "update tick" part.
procedure

Last seen on 23:16, 12. Apr 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This worked for the most…
Wed, 07/15/2020 - 00:54

This worked for the most part, however I noticed a few glitches. Sometimes the blocks would disappear after you took them out of the output slot and if you dragged them normally from the output slot and went back into the trading block they would disappear. I feel like mcreator should just make a procedure block for you that does all of this stuff so you don't have to deal with all of this just to do something simple.