Fixed PlayerDigging status reading, as it's an unsigned byte, not signed.
Fixed WindowConfirmation, OpenHorseWindow, WindowConfirmation window id reading as it's an unsigned byte, not signed.
This commit is contained in:
1 parent
474a2c9e2e
commit
3a6778eee7
4 files changed
+8
-8
No files matched your search
+1
-1
@@ -59,7 +59,7 @@ public class WrapperPlayClientPlayerDigging extends PacketWrapper<WrapperPlayCli
|
||||
int z = readInt();
|
||||
blockPosition = new Vector3i(x, y, z);
|
||||
}
|
||||
byte face = readByte();
|
||||
short face = readUnsignedByte();
|
||||
blockFace = BlockFace.getBlockFaceByValue(face);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class WrapperPlayClientWindowConfirmation extends PacketWrapper<WrapperPl
|
||||
|
||||
@Override
|
||||
public void readData() {
|
||||
windowId = readByte();
|
||||
windowId = readUnsignedByte();
|
||||
actionId = readShort();
|
||||
accepted = readBoolean();
|
||||
}
|
||||
|
||||
+5
-5
@@ -5,7 +5,7 @@ import com.github.retrooper.packetevents.protocol.packettype.PacketType;
|
||||
import com.github.retrooper.packetevents.wrapper.PacketWrapper;
|
||||
|
||||
public class WrapperPlayServerOpenHorseWindow extends PacketWrapper<WrapperPlayServerOpenHorseWindow> {
|
||||
byte windowId;
|
||||
int windowId;
|
||||
int slotCount;
|
||||
int entityId;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class WrapperPlayServerOpenHorseWindow extends PacketWrapper<WrapperPlayS
|
||||
super(event);
|
||||
}
|
||||
|
||||
public WrapperPlayServerOpenHorseWindow(byte windowId, int slotCount, int entityId) {
|
||||
public WrapperPlayServerOpenHorseWindow(int windowId, int slotCount, int entityId) {
|
||||
super(PacketType.Play.Server.OPEN_HORSE_WINDOW);
|
||||
this.windowId = windowId;
|
||||
this.slotCount = slotCount;
|
||||
@@ -22,7 +22,7 @@ public class WrapperPlayServerOpenHorseWindow extends PacketWrapper<WrapperPlayS
|
||||
|
||||
@Override
|
||||
public void readData() {
|
||||
this.windowId = (byte) readUnsignedByte();
|
||||
this.windowId = readUnsignedByte();
|
||||
this.slotCount = readVarInt();
|
||||
this.entityId = readInt();
|
||||
}
|
||||
@@ -41,11 +41,11 @@ public class WrapperPlayServerOpenHorseWindow extends PacketWrapper<WrapperPlayS
|
||||
writeInt(entityId);
|
||||
}
|
||||
|
||||
public byte getWindowId() {
|
||||
public int getWindowId() {
|
||||
return windowId;
|
||||
}
|
||||
|
||||
public void setWindowId(byte windowId) {
|
||||
public void setWindowId(int windowId) {
|
||||
this.windowId = windowId;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class WrapperPlayServerWindowConfirmation extends PacketWrapper<WrapperPl
|
||||
|
||||
@Override
|
||||
public void readData() {
|
||||
this.windowId = readByte();
|
||||
this.windowId = readUnsignedByte();
|
||||
this.actionId = readShort();
|
||||
this.accepted = readBoolean();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user