Need help making a special tool destroy a block that nothing else can but don't know how to make the procedure

Started by Cryptic_Fanta on

Topic category: Help with modding (Java Edition)

Last seen on 00:06, 17. Apr 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need help making a special tool destroy a block that nothing else can but don't know how to make the procedure

I have everything I want just how do I make sure the player is holding the pickaxe and if the player is the block will break?  

Last seen on 03:15, 26. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i might have a solution, but…
Sun, 02/18/2024 - 00:39

i might have a solution, but I'm not sure i entirely understand... the block is unbreakable like bedrock? if so, you'd go into "when entity swings item" check if entity is a player, if it is, check where the player is looking (Id use raytrace distance x y z) and check if the block there is the block that you want, if so, break it and drop the block, or just replace it with air

Last seen on 00:06, 17. Apr 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well I mean like if the…
Sun, 02/18/2024 - 00:45

well I mean like if the player is holding the pickaxe and right clicks the block it will break thats the part I don't know how to do