Only send the teleport packet if its a painting disguise
This commit is contained in:
		| @@ -316,16 +316,17 @@ public class PacketsManager { | |||||||
|             spawnPackets[0].getModifier().write(2, (int) Math.floor(loc.getY() * 32D)); |             spawnPackets[0].getModifier().write(2, (int) Math.floor(loc.getY() * 32D)); | ||||||
|             spawnPackets[0].getModifier().write(8, yaw); |             spawnPackets[0].getModifier().write(8, yaw); | ||||||
|  |  | ||||||
|             // Make the teleport packet to make it visible.. |             if (disguise.getType() == DisguiseType.PAINTING) { | ||||||
|             spawnPackets[1] = new PacketContainer(PacketType.Play.Server.ENTITY_TELEPORT); |                 // Make the teleport packet to make it visible.. | ||||||
|             StructureModifier<Object> mods = spawnPackets[1].getModifier(); |                 spawnPackets[1] = new PacketContainer(PacketType.Play.Server.ENTITY_TELEPORT); | ||||||
|             mods.write(0, disguisedEntity.getEntityId()); |                 StructureModifier<Object> mods = spawnPackets[1].getModifier(); | ||||||
|             mods.write(1, (int) Math.floor(loc.getX() * 32D)); |                 mods.write(0, disguisedEntity.getEntityId()); | ||||||
|             mods.write(2, (int) Math.floor(loc.getY() * 32D)); |                 mods.write(1, (int) Math.floor(loc.getX() * 32D)); | ||||||
|             mods.write(3, (int) Math.floor(loc.getZ() * 32D)); |                 mods.write(2, (int) Math.floor(loc.getY() * 32D)); | ||||||
|             mods.write(4, yaw); |                 mods.write(3, (int) Math.floor(loc.getZ() * 32D)); | ||||||
|             mods.write(5, pitch); |                 mods.write(4, yaw); | ||||||
|  |                 mods.write(5, pitch); | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|         if (spawnPackets[1] == null) { |         if (spawnPackets[1] == null) { | ||||||
|             // Make a packet to turn his head! |             // Make a packet to turn his head! | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user