Merge pull request #1379 from creeper123123321/1_8inconsistencyfix

Fix inconsistent types in block placement
This commit is contained in:
Myles 2020-04-14 17:43:20 +01:00 committed by GitHub
commit 5af9f025d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,8 +291,8 @@ public class WorldPackets {
wrapper.clearInputBuffer(); wrapper.clearInputBuffer();
// First set this packet ID to Block placement // First set this packet ID to Block placement
wrapper.setId(0x08); wrapper.setId(0x08);
wrapper.write(Type.LONG, -1L); wrapper.write(Type.POSITION, new Position(-1, (short) -1, -1));
wrapper.write(Type.BYTE, (byte) 255); wrapper.write(Type.UNSIGNED_BYTE, (short) 255);
// Write item in hand // Write item in hand
Item item = Protocol1_9To1_8.getHandItem(wrapper.user()); Item item = Protocol1_9To1_8.getHandItem(wrapper.user());
// Blocking patch // Blocking patch
@ -315,9 +315,9 @@ public class WorldPackets {
} }
wrapper.write(Type.ITEM, item); wrapper.write(Type.ITEM, item);
wrapper.write(Type.BYTE, (byte) 0); wrapper.write(Type.UNSIGNED_BYTE, (short) 0);
wrapper.write(Type.BYTE, (byte) 0); wrapper.write(Type.UNSIGNED_BYTE, (short) 0);
wrapper.write(Type.BYTE, (byte) 0); wrapper.write(Type.UNSIGNED_BYTE, (short) 0);
} }
}); });