Taking and Adding Block Inventory Issue with Procedure

Started by snoweyrawr on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Taking and Adding Block Inventory Issue with Procedure

This is my 'Shop' procedure which I'm having issues taking and adding to the blocks inventory.

The issue is the same I'm going to assume for both taking and adding as it has to loop 9 times in both 'Shop Inventory' and 'Shop Profits'.  In this procedure, when I right click with an item(s) which matches slot '1' on the Shop block it will take my item(s) '1' and give me item(s) from slot '0'. It then places item(s) '1' in slot '11' and removes item(s) from slot '2' of the inventory. Works from that point of view. However, I need to keep taking items from slots 3-10 and adding items to slots 12-20. How would I achieve this? Please break down what I need from the procedure menu to do this. I can feel like I'm in touch distance on the shop buying and sell procedure now, just last issue to overcome. Will add additional checks for stock after.

Procedure Screenshot:

Current Procedure

ShopSeller GUI Screenshot:

Shop GUI

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I had a hard time reading…
Mon, 03/17/2025 - 15:12

I had a hard time reading your prompt but from what i can tell you need to put items in the players inventory from your shop. In each of your buttons you add procedure to the "on clicked" trigger to check if the player has enough currency then use the block "add [number] [item] to event/target player inventory" replace the item slot with "get copy of item from slot [number]" then you can do whatever system u use to keep track of items to clear the slot. You could use vars to make a stock system so you can only buy a certain amount.

Follow up if you need further clarification.

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@TurtleInAHat Granting a…
Mon, 03/17/2025 - 20:28

@TurtleInAHat Granting a player the item and number of items is fine and the deducting of the cost of the item and amount of items is fine also. The issue is with the inventory of the block. It will take a stack from slot '02' and add currency to slot '11'. However it only takes inventory from stock '02' and not 3-10. Same with slots 11 - 19, it only places inventory in that slot and uses a set mechanism when really it should be an add. Does that make sense? 

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can I see your procedure?
Mon, 03/17/2025 - 23:07

Can I see your procedure?

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you right click the…
Tue, 03/18/2025 - 20:03

If you right click the procedure image and open in new tab, it will let you save it to view.

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I had a play around with the…
Tue, 03/18/2025 - 23:35

I had a play around with the procedures and managed to get something working and changed it all to block inventory and not opengui. Thank you for looking though.