Fix acknowledge player digging

This commit is contained in:
KennyTV 2019-12-11 11:58:55 +01:00
parent 653a38fbba
commit a25b002fa8
2 changed files with 15 additions and 1 deletions

View File

@ -215,7 +215,6 @@ public class Protocol1_14_4To1_15 extends BackwardsProtocol {
registerOutgoing(State.PLAY, 0x56, 0x55); registerOutgoing(State.PLAY, 0x56, 0x55);
registerOutgoing(State.PLAY, 0x57, 0x56); registerOutgoing(State.PLAY, 0x57, 0x56);
registerOutgoing(State.PLAY, 0x5A, 0x59); registerOutgoing(State.PLAY, 0x5A, 0x59);
registerOutgoing(State.PLAY, 0x08, 0x5C);
} }
public static int getNewBlockStateId(int id) { public static int getNewBlockStateId(int id) {

View File

@ -106,6 +106,21 @@ public class BlockItemPackets1_15 extends BlockItemRewriter<Protocol1_14_4To1_15
// Creative Inventory Action // Creative Inventory Action
itemRewriter.registerCreativeInvAction(Type.FLAT_VAR_INT_ITEM, 0x26, 0x26); itemRewriter.registerCreativeInvAction(Type.FLAT_VAR_INT_ITEM, 0x26, 0x26);
// Acknowledge player digging
protocol.registerOutgoing(State.PLAY, 0x08, 0x5C, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.POSITION1_14);
map(Type.VAR_INT);
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
wrapper.set(Type.VAR_INT, 0, Protocol1_14_4To1_15.getNewBlockStateId(wrapper.get(Type.VAR_INT, 0)));
}
});
}
});
// Block Action // Block Action
protocol.registerOutgoing(State.PLAY, 0x0B, 0x0A, new PacketRemapper() { protocol.registerOutgoing(State.PLAY, 0x0B, 0x0A, new PacketRemapper() {
@Override @Override