Started by
Ferryboo
on
Topic category: Help with Minecraft modding (Java Edition)
So i made an entity bomb flower and i'm trying to make it spawn a bomb entity if no other bombs are nearby. The procedure detects that a bomb is nearby and stops spawning bombs after like 80 of them are spawned. I set it to OnEntityTickUpdate
Edited by Ferryboo on Wed, 10/19/2022 - 15:20
There should be some specific procedures in the 'world' tab to check the number of entities within a given radius. Keep in mind though that a 3 cube radius is pretty small, and anything upwards of 30+ entities with AI could cause some serious lag. (Also, this will only spawn them directly inside the first entity. You could use random variables to check different locations for viability and then spawn the entity there- or, if you're using explosives, you could also just give the thing a projectile attack. If you remove the 'discard in ground' section in the custom code of a projectile, you can make a projectile entity that stays in the world, and from there could give the projectile a delay procedure before exploding.
Thank you for the answer, the problem is that it actually does detect that the entity is there, but it spawns a BUNCH of them instead of just a single one