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

@@ -296,27 +296,15 @@ public class NoppesUtilServer {
double motionX, double motionY, double motionZ, float gravity,
float scale1, float scale2, float scaleRate, int scaleRateStart,
float alpha1, float alpha2, float alphaRate, int alphaRateStart,
String playerName, EntityPlayer playerObj
int entityID
){
List<Entity> playerEntities = playerObj.worldObj.getEntitiesWithinAABB(Entity.class, playerObj.boundingBox.expand(300, 300, 300));
String UUID = "";
int entityID = -1;
for(Entity e : playerEntities){
if(e.equals(entity)){
UUID = e.getUniqueID().toString();
entityID = e.getEntityId();
break;
}
}
Server.sendAssociatedData(entity, EnumPacketClient.SCRIPTED_PARTICLE,
directory, HEXcolor, amount, maxAge,
x, y, z,
motionX, motionY, motionZ, gravity,
scale1, scale2, scaleRate, scaleRateStart,
alpha1, alpha2, alphaRate, alphaRateStart,
playerName, UUID, entityID
entityID
);
}