Right click procedure executing many times...?

Started by Hazzah_ on Tue, 01/19/2021 - 12:21

Topic category: Help with modding (Java Edition)

Last seen on 17:59, 2. Mar 2021
Joined Aug 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Right click procedure executing many times...?
Tue, 01/19/2021 - 12:21

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 20:49, 8. Feb 2021
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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:59, 2. Mar 2021
Joined Aug 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 20:49, 8. Feb 2021
Joined Jul 2020
User points:

User statistics:

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