mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-11 19:50:30 +00:00
Fix a null error
This commit is contained in:
parent
7e099a985c
commit
a032155f5b
1 changed files with 5 additions and 1 deletions
|
@ -75,7 +75,11 @@ public class PacketListenerClientInteract extends PacketAdapter {
|
||||||
|
|
||||||
private EnumWrappers.Hand getHand(PacketContainer packet) {
|
private EnumWrappers.Hand getHand(PacketContainer packet) {
|
||||||
if (!NmsVersion.v1_17.isSupported()) {
|
if (!NmsVersion.v1_17.isSupported()) {
|
||||||
return packet.getHands().read(0);
|
if (getInteractType(packet) != EnumWrappers.EntityUseAction.ATTACK) {
|
||||||
|
return packet.getHands().read(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return EnumWrappers.Hand.MAIN_HAND;
|
||||||
}
|
}
|
||||||
|
|
||||||
WrappedEnumEntityUseAction action = packet.getEnumEntityUseActions().read(0);
|
WrappedEnumEntityUseAction action = packet.getEnumEntityUseActions().read(0);
|
||||||
|
|
Loading…
Reference in a new issue