problem with disabling the picking of a stack of items from a slot

Started by SuperMax64 on

Topic category: Help with modding (Java Edition)

Last seen on 19:11, 19. Aug 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
problem with disabling the picking of a stack of items from a slot
Tue, 06/25/2024 - 17:21 (edited)

I'm making a mod for a machine that creates a portal when you insert a crystal into a slot and press a button. I need it so that while the machine is running the player cannot take the crystal from the slot. I tried a lot of things, for example, creating an nbt tag in a block and trying to make a condition on it, such as returning a logical value when the tag = true.https://imgur.com/a/GxoipKS

But it doesn't work! Please help!

Edited by SuperMax64 on Tue, 06/25/2024 - 17:21
Last seen on 02:18, 7. Jul 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is it possible that you are…
Wed, 06/26/2024 - 02:17

is it possible that you are not applying the procedure to the slot?

Last seen on 19:11, 19. Aug 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no, I definitely apply it to…
Wed, 06/26/2024 - 04:06

no, I definitely apply it to the slot

Last seen on 19:11, 19. Aug 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
but I found out that a…
Wed, 06/26/2024 - 04:08

but I found out that a global variable will work as a condition BUT in this case I can't use global variables