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