mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-12 08:41:00 -05:00
Update unknown value in ClientPlayerInteractEntityPacket
This commit is contained in:
parent
02781ed56c
commit
b9e1888e6c
1 changed files with 7 additions and 7 deletions
|
@ -27,14 +27,14 @@ public class ClientPlayerInteractEntityPacket implements Packet {
|
||||||
private float targetY;
|
private float targetY;
|
||||||
private float targetZ;
|
private float targetZ;
|
||||||
private @NonNull Hand hand;
|
private @NonNull Hand hand;
|
||||||
private boolean unknown;
|
private boolean isSneaking;
|
||||||
|
|
||||||
public ClientPlayerInteractEntityPacket(int entityId, InteractAction action, boolean unknown) {
|
public ClientPlayerInteractEntityPacket(int entityId, InteractAction action, boolean isSneaking) {
|
||||||
this(entityId, action, Hand.MAIN_HAND, unknown);
|
this(entityId, action, Hand.MAIN_HAND, isSneaking);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClientPlayerInteractEntityPacket(int entityId, InteractAction action, Hand hand, boolean unknown) {
|
public ClientPlayerInteractEntityPacket(int entityId, InteractAction action, Hand hand, boolean isSneaking) {
|
||||||
this(entityId, action, 0, 0, 0, hand, unknown);
|
this(entityId, action, 0, 0, 0, hand, isSneaking);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,7 +50,7 @@ public class ClientPlayerInteractEntityPacket implements Packet {
|
||||||
if(this.action == InteractAction.INTERACT || this.action == InteractAction.INTERACT_AT) {
|
if(this.action == InteractAction.INTERACT || this.action == InteractAction.INTERACT_AT) {
|
||||||
this.hand = MagicValues.key(Hand.class, in.readVarInt());
|
this.hand = MagicValues.key(Hand.class, in.readVarInt());
|
||||||
}
|
}
|
||||||
this.unknown = in.readBoolean();
|
this.isSneaking = in.readBoolean();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -66,7 +66,7 @@ public class ClientPlayerInteractEntityPacket implements Packet {
|
||||||
if(this.action == InteractAction.INTERACT || this.action == InteractAction.INTERACT_AT) {
|
if(this.action == InteractAction.INTERACT || this.action == InteractAction.INTERACT_AT) {
|
||||||
out.writeVarInt(MagicValues.value(Integer.class, this.hand));
|
out.writeVarInt(MagicValues.value(Integer.class, this.hand));
|
||||||
}
|
}
|
||||||
out.writeBoolean(this.unknown);
|
out.writeBoolean(this.isSneaking);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue