Fix a error with casting
This commit is contained in:
parent
d09d7d6549
commit
8b3df2abf4
@ -644,12 +644,12 @@ public class PacketsManager {
|
|||||||
PacketContainer packet = new PacketContainer(Packets.Server.ENTITY_METADATA);
|
PacketContainer packet = new PacketContainer(Packets.Server.ENTITY_METADATA);
|
||||||
StructureModifier<Object> mods = packet.getModifier();
|
StructureModifier<Object> mods = packet.getModifier();
|
||||||
mods.write(0, entity.getEntityId());
|
mods.write(0, entity.getEntityId());
|
||||||
List watchableList = new ArrayList();
|
List<WrappedWatchableObject> watchableList = new ArrayList<WrappedWatchableObject>();
|
||||||
byte b = (byte) (0 | 1 << 5);
|
byte b = (byte) (0 | 1 << 5);
|
||||||
if (event.getPlayer().isSprinting())
|
if (event.getPlayer().isSprinting())
|
||||||
b = (byte) (b | 1 << 3);
|
b = (byte) (b | 1 << 3);
|
||||||
watchableList.add(new WrappedWatchableObject(0, b));
|
watchableList.add(new WrappedWatchableObject(0, b));
|
||||||
mods.write(1, watchableList);
|
packet.getWatchableCollectionModifier().write(0, watchableList);
|
||||||
try {
|
try {
|
||||||
ProtocolLibrary.getProtocolManager().sendServerPacket(event.getPlayer(), packet, false);
|
ProtocolLibrary.getProtocolManager().sendServerPacket(event.getPlayer(), packet, false);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
Loading…
Reference in New Issue
Block a user