How do I make Right click on block despawn nearest specific entity

Started by lawpash on

Topic category: Help with modding (Java Edition)

Last seen on 08:25, 4. Jun 2023
Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make Right click on block despawn nearest specific entity

I’ve tried everything and can’t figure it out.

Last seen on 11:15, 25. Apr 2024
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Go to the block you want to…
Mon, 05/22/2023 - 11:20

Go to the block you want to right click on, after go to ''triggers'', find ''On block right clicked'', click the plus to make a new procedure.

After, do this:

Despawn [Get nearest entity at x: x y: y z : z in square cube with size (from how far away you want your block to be able to despawn the entity) of type (your entity)]

Despawn can be found in the ''Entity Management'' tab and ''Get nearest entity'' at the bottom of the ''World Data'' tab.

Should work like a charm ;)

Last seen on 12:45, 25. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not sure if that…
Mon, 05/22/2023 - 13:35

I'm not sure if that procedure will give a "null" error, but if it does, there is a procedure block that will check if your entity exists within the area, and that will fix a "null" error

Last seen on 08:08, 11. Mar 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Pls tell me
Thu, 10/05/2023 - 06:15

Pls tell me