Right Clicking on block changes it

Started by highfive51 on

Topic category: Help with modding (Java Edition)

Last seen on 07:19, 10. Mar 2022
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Right Clicking on block changes it

Hello! I am currently making a procedure where whenever you right-click on a block while holding another block in your hand, it changes the block by removing the block in your hand and replacing the old block. For example:

-There is a "plain counter" block on the ground

-You are holding a polished granite block in your hand and click on the plain counter with it

-The polished counter block disappears from your inventory, and the plain counter block is replaced with a granite counter block

 

Last seen on 02:56, 27. Jun 2023
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can probably do this by…
Mon, 03/14/2022 - 21:58

You can probably do this by checking when the block is right clicked, if you have the correct block in hand, and then removing the block at that location and placing a new one at that location.