Fixed 1.8 -> 1.7.10 release item direction value

This commit is contained in:
RaphiMC 2024-04-01 00:44:17 +02:00
parent 9ed5575a29
commit d4d448b3e5
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94

View File

@ -1234,6 +1234,12 @@ public class Protocol1_8to1_7_6_10 extends AbstractProtocol<ClientboundPackets1_
map(Type.VAR_INT, Type.UNSIGNED_BYTE); // status
map(Type.POSITION1_8, Types1_7_6.POSITION_UBYTE); // position
map(Type.UNSIGNED_BYTE); // direction
handler(wrapper -> {
final short status = wrapper.get(Type.UNSIGNED_BYTE, 0);
if (status == 5) { // RELEASE_USE_ITEM
wrapper.set(Type.UNSIGNED_BYTE, 1, (short) 255);
}
});
}
});
this.registerServerbound(ServerboundPackets1_8.PLAYER_BLOCK_PLACEMENT, new PacketHandlers() {