From b9e1888e6c86a8ee489a5e88ff79c9598339a209 Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Sat, 20 Jun 2020 21:12:44 -0400 Subject: [PATCH] Update unknown value in ClientPlayerInteractEntityPacket --- .../player/ClientPlayerInteractEntityPacket.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/client/player/ClientPlayerInteractEntityPacket.java b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/client/player/ClientPlayerInteractEntityPacket.java index 29d9477b..e460d728 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/client/player/ClientPlayerInteractEntityPacket.java +++ b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/client/player/ClientPlayerInteractEntityPacket.java @@ -27,14 +27,14 @@ public class ClientPlayerInteractEntityPacket implements Packet { private float targetY; private float targetZ; private @NonNull Hand hand; - private boolean unknown; + private boolean isSneaking; - public ClientPlayerInteractEntityPacket(int entityId, InteractAction action, boolean unknown) { - this(entityId, action, Hand.MAIN_HAND, unknown); + public ClientPlayerInteractEntityPacket(int entityId, InteractAction action, boolean isSneaking) { + this(entityId, action, Hand.MAIN_HAND, isSneaking); } - public ClientPlayerInteractEntityPacket(int entityId, InteractAction action, Hand hand, boolean unknown) { - this(entityId, action, 0, 0, 0, hand, unknown); + public ClientPlayerInteractEntityPacket(int entityId, InteractAction action, Hand hand, boolean isSneaking) { + this(entityId, action, 0, 0, 0, hand, isSneaking); } @Override @@ -50,7 +50,7 @@ public class ClientPlayerInteractEntityPacket implements Packet { if(this.action == InteractAction.INTERACT || this.action == InteractAction.INTERACT_AT) { this.hand = MagicValues.key(Hand.class, in.readVarInt()); } - this.unknown = in.readBoolean(); + this.isSneaking = in.readBoolean(); } @Override @@ -66,7 +66,7 @@ public class ClientPlayerInteractEntityPacket implements Packet { if(this.action == InteractAction.INTERACT || this.action == InteractAction.INTERACT_AT) { out.writeVarInt(MagicValues.value(Integer.class, this.hand)); } - out.writeBoolean(this.unknown); + out.writeBoolean(this.isSneaking); } @Override