Problem using a 'key' to use a block's functionality

Started by ImDiensteDesKGB on

Topic category: Help with modding (Java Edition)

Last seen on 09:24, 22. Jun 2023
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Problem using a 'key' to use a block's functionality

Hello, i am trying to make a block that 'mints' coins.
To mint coins you need to have a key in your inventory.
 Minting the coin takes 2 "celestium fragments"
Right now i am not trying to implement the fact that the fragments are consumed.
I just want to count the number of celestium fragments the player has and if they have more than two and the player has the key item, it will spawn a coin

Here is my procedure to execute when my 'minting table' is right clicked, when i right click it it sends the message "+1 nb frags" but not "spawn gem" and nothing is spawned
Could anybody tell me whats wrong and how can i fix it please