3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-06 05:00:09 +02:00

Fix acknowledge digging

Fixes #1564
Dieser Commit ist enthalten in:
KennyTV 2019-12-11 09:30:51 +01:00
Ursprung 3d10c56aac
Commit dfbe2e9739
2 geänderte Dateien mit 16 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -233,9 +233,6 @@ public class Protocol1_15To1_14_4 extends Protocol {
registerOutgoing(State.PLAY, 0x58, 0x59);
registerOutgoing(State.PLAY, 0x59, 0x5A);
registerOutgoing(State.PLAY, 0x5C, 0x08);
}
public static int getNewSoundId(int id) {

Datei anzeigen

@ -17,6 +17,22 @@ import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
public class WorldPackets {
public static void register(Protocol protocol) {
// Acknowledge player digging
protocol.registerOutgoing(State.PLAY, 0x5C, 0x08, 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 {
int blockState = wrapper.get(Type.VAR_INT, 0);
wrapper.set(Type.VAR_INT, 0, Protocol1_15To1_14_4.getNewBlockStateId(blockState));
}
});
}
});
// Block Action
protocol.registerOutgoing(State.PLAY, 0x0A, 0x0B, new PacketRemapper() {
@Override