HELP with swapping items in inventory procedure (please lol)

Started by FullMetalAvatar on

Topic category: Help with modding (Java Edition)

Last seen on 14:23, 19. Jul 2023
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
HELP with swapping items in inventory procedure (please lol)

OKAY so this is my last resort because I've tried searching everywhere else for some help on this, but I'm drawing a blank! So I basically have made a coffee grinder block (successfully) and I want to add a right-click procedure to it.

Basically, if a player is holding a 'Coffee Bean' item, they can right-click the grinder to turn the coffee bean into ground coffee. If the player does not have any coffee beans, it'll send a message in the chat saying "You need coffee beans first!"

I did want to make it more complex but if I can just figure this out then I can work on doing the harder stuff another time! How do I go about this? I've made this procedure so far  (https://i.imgur.com/anX62Q4.png) but as you can see, it isn't working due to a missing dependency that I don't know how to resolve! Can someone PLEASE explain this? I'd appreciate it greatly!

Last seen on 11:17, 29. Mar 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what's your mcreator version…
Thu, 05/05/2022 - 15:18

what's your mcreator version ?

Last seen on 02:16, 29. Mar 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Turn the "On player right…
Thu, 05/05/2022 - 15:25

Turn the "On player right clicks block" global procedure to blank and instead apply that procedure to your coffee grinder block.

Last seen on 14:23, 19. Jul 2023
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm on version 2021.3!  I…
Thu, 05/05/2022 - 18:38

I'm on version 2021.3! 

I also tried doing this but I'm still getting the missing dependencies error :(

Last seen on 11:17, 29. Mar 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok good then do this way:  …
Thu, 05/05/2022 - 20:39

Ok good then do this way:

 

1) use block right click tag and not player right clicdk

2) don't use shrink block but substitute with remove or set item number to get item number

 

now it works