Particle packets are only sent to players in the particle's world now.

This commit is contained in:
Luis C.M committed 2022-07-02 13:07:23 -05:00
1 parent 9ceec111ba
commit c8a3b7825d
5 files changed
+19 -25

No files matched your search

@@ -315,8 +315,13 @@ public class NoppesUtilServer {
Server.sendAssociatedData(entity, EnumPacketClient.PARTICLE, entity.posX, entity.posY, entity.posZ, entity.height, entity.width, entity.yOffset, particle);
}
public static void spawnScriptedParticle(NBTTagCompound compound){
Server.sendToAll(EnumPacketClient.SCRIPTED_PARTICLE, compound);
public static void spawnScriptedParticle(NBTTagCompound compound, int dimensionId){
List<EntityPlayer> list = MinecraftServer.getServer().getConfigurationManager().playerEntityList;
for (EntityPlayer player : list) {
if (player.worldObj.provider.dimensionId == dimensionId) {
Server.sendData((EntityPlayerMP) player, EnumPacketClient.SCRIPTED_PARTICLE, compound);
}
}
}
public static void deleteNpc(EntityNPCInterface npc,EntityPlayer player) {