Right click procedure executing many times...?

Started by Hazzah_ on

Topic category: Help with modding (Java Edition)

Last seen on 17:20, 17. Mar 2024
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Right click procedure executing many times...?

I was trying to make block that would store an item from your hand, and put it in the next free slot.

For the sake of simplicity, I limited the procedure to one slot: https://imgur.com/a/IZlZ7Lw

After right clicking the slot is still empty, it consumes the whole itemstack (not just one item), and it sounds like the sound plays multiple times, hence the title.

 

Last seen on 00:03, 27. May 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes there is more to…
Wed, 01/20/2021 - 03:43

Yes there is more to understand about the >>> set [value] [item] in slot [value] of block at x [value] y [value] z [value]

The workaround that i made was this.

if you do as shown it will...

check if the number of items in slot (0) is less than 64.

then
if you have no item in your hand it will open inventory.

then

if you have an item in hand and it is the same item in the block or the block has no item in the slot

then

it will add 1 item of item in hand.

in slot (0) then it will subtract the item in your main hand for 1.

The contents found in the current reply are fair use for anyone.

 

Place_item_in_slot.img

Last seen on 17:20, 17. Mar 2024
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can't even put it in the…
Wed, 01/20/2021 - 19:22

Can't even put it in the trigger, cause it has itemstack dependency...

Last seen on 00:03, 27. May 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you want my help i need…
Thu, 01/21/2021 - 04:49

If you want my help i need further explanation.
everything i posted should do what you ask.

if not reply with more info on what you want and or what should happen that is not already.