when player breaks specific block procedure

Started by YOYASHAS on

Topic category: Advanced modding

Last seen on 15:32, 29. Sep 2022
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
when player breaks specific block procedure

when player breaks specific block procedure and if ender pearl is thrown then procedure

Last seen on 20:08, 17. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The specific block procedure…
Thu, 11/03/2022 - 14:43

The specific block procedure is fairly simple, just have a procedure that checks when a block is broken, and checks if the block is a specific type. (And if the entity is a player, if you don't want explosions or other stuff to trigger it.) 

...The ender pearl one is a bit trickier. You essentially have to detect when a player teleports, which doesn't have a specific trigger in the game. You could try to do something that triggers when an Ender Pearl projectile entity dies, Or make some sort of custom variables that constantly save the player's location, and detect when that location changes abruptly. (Though this would trigger for any sort of teleportation, and, probably, if the player is just moving really fast.)