Changed entity search method for custom particles to solely use entity IDs instead of entities near the closest player.

This commit is contained in:
luisc committed 2021-09-06 12:28:14 -05:00
1 parent fbc22fdef2
commit 6e9c693d49
3 files changed
+17 -42

No files matched your search

@@ -61,18 +61,13 @@ public class ScriptEntity {
float scale1, float scale2, float scaleRate, int scaleRateStart,
float alpha1, float alpha2, float alphaRate, int alphaRateStart
) {
List<EntityPlayer> entities = entity.worldObj.getEntitiesWithinAABB(EntityPlayer.class, entity.boundingBox.expand(300, 300, 300));
if(entities.size() < 1)
return;
EntityPlayer playerObj = entities.get(0);
String playerName = playerObj.getDisplayName();
int entityID = entity.getEntityId();
NoppesUtilServer.spawnScriptedParticle(entity, directory, HEXcolor, amount, maxAge,
x, y, z,
motionX, motionY, motionZ, gravity,
scale1, scale2, scaleRate, scaleRateStart,
alpha1, alpha2, alphaRate, alphaRateStart,
playerName, playerObj
entityID
);
}