How to make remove block or item from main hand

Started by DJ MECHANG on

Topic category: Mod ideas exchange

Last seen on 12:34, 15. Sep 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make remove block or item from main hand

it's really simple actually...   

 

Basic: (trust me) sorry i couldn't import the image i don't know how to...

event trigger - Player right clicks block

add a wait 1 tick on sever-side (to make sure it can reset)

inside of wait 1 tick, add the first If get item event/target entity is using = your block or item you want to use

at the bottom of the first if statement add what you want it to do, place, remove, spawn particles etc

inside of the if statement, add another If statement,

inside of the second If statement, add is even/entity target in game mode survival (Just to make sure that in creative mode the item or block doesn't get removed)

also add remove 1 item in main hand, in the second If statement

Hope this is helpful!!!! :)

 

you can add even more block and functions with this base of the procedure done! I use this for Bonemeal to my Custom Plants!