Don't let clients know dolphins can secretly walk, fixes dolphins acting curious and glancing about as you walk
This commit is contained in:
		| @@ -149,12 +149,12 @@ public class PacketHandlerMovement implements IPacketHandler { | ||||
|                 statusPacket.getIntegers().write(0, entity.getEntityId()); | ||||
|                 statusPacket.getBytes().write(0, (byte) 1); | ||||
|             } | ||||
|         } else | ||||
|             // Stop wither skulls from looking | ||||
|             if (sentPacket.getType() == PacketType.Play.Server.ENTITY_LOOK && | ||||
|         } else if (sentPacket.getType() == PacketType.Play.Server.ENTITY_LOOK && | ||||
|                 disguise.getType() == DisguiseType.WITHER_SKULL) { | ||||
|             // Stop wither skulls from looking | ||||
|             packets.clear(); | ||||
|             } else if (sentPacket.getType() != PacketType.Play.Server.REL_ENTITY_MOVE) { | ||||
|         } else { | ||||
|             if (sentPacket.getType() != PacketType.Play.Server.REL_ENTITY_MOVE) { | ||||
|                 packets.clear(); | ||||
|  | ||||
|                 PacketContainer movePacket = sentPacket.shallowClone(); | ||||
| @@ -190,6 +190,18 @@ public class PacketHandlerMovement implements IPacketHandler { | ||||
|                     if (y != 0) { | ||||
|                         doubles.write(2, doubles.read(2) + y); | ||||
|                     } | ||||
|                 } else if (disguise.getType() == DisguiseType.DOLPHIN) { | ||||
|                     movePacket.getBooleans().write(0, false); | ||||
|                 } | ||||
|             } else if (disguise.getType() == DisguiseType.DOLPHIN) { | ||||
|                 // Dolphins act funny on the ground, so lets not tell the clients they are on the ground | ||||
|                 packets.clear(); | ||||
|  | ||||
|                 PacketContainer movePacket = sentPacket.shallowClone(); | ||||
|  | ||||
|                 packets.addPacket(movePacket); | ||||
|  | ||||
|                 movePacket.getBooleans().write(0, false); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user