How do I make a procedure that despawns an entity when touching a specific block?

Started by Puglord123 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a procedure that despawns an entity when touching a specific block?
Sun, 12/10/2023 - 14:00 (edited)

I am still working on my Portal Mod and version 1.0 is almost done but i still want to add a feature to the portals that despawns the portal entities when they are touching two certain blocks. Is this possible? If yes then how to do it?

Edited by Puglord123 on Sun, 12/10/2023 - 14:00
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
...You should just be able…
Mon, 12/11/2023 - 12:55

...You should just be able to check if each of the adjacent blocks is of the type that despawns portals. If you wanted to be fancier ten just programming in each of the 27 positions individually, you could use the 'check for block in 6*6 box' procedure template, reconfigured to a three block radius. Am I misreading?

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright so I probably should…
Tue, 12/12/2023 - 18:16

Alright so I probably should have worded that differently, what i am trying to do is make a procedure that checks if an entity touches a certain type of block (for example obsidian) when the entity is spawned and if it is touching that block then it despawns