mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-26 20:16:02 +01:00
Merge pull request #1122 from Gerrygames/1.14
fix book signing and opening in 18w50a
This commit is contained in:
commit
3a4aed0b34
@ -85,6 +85,11 @@ public class InventoryPackets {
|
|||||||
wrapper.passthrough(Type.INT); // Number of tools uses
|
wrapper.passthrough(Type.INT); // Number of tools uses
|
||||||
wrapper.passthrough(Type.INT); // Maximum number of trade uses
|
wrapper.passthrough(Type.INT); // Maximum number of trade uses
|
||||||
}
|
}
|
||||||
|
} else if (channel.equals("minecraft:book_open") || channel.equals("book_open")) {
|
||||||
|
int hand = wrapper.read(Type.VAR_INT);
|
||||||
|
wrapper.clearPacket();
|
||||||
|
wrapper.setId(0x2C);
|
||||||
|
wrapper.write(Type.VAR_INT, hand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -28,6 +28,19 @@ public class PlayerPackets {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Edit Book
|
||||||
|
protocol.registerIncoming(State.PLAY, 0x0B, 0x0B, new PacketRemapper() {
|
||||||
|
@Override
|
||||||
|
public void registerMap() {
|
||||||
|
handler(new PacketHandler() {
|
||||||
|
@Override
|
||||||
|
public void handle(PacketWrapper wrapper) throws Exception {
|
||||||
|
InventoryPackets.toServer(wrapper.passthrough(Type.FLAT_VAR_INT_ITEM));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Player Digging
|
// Player Digging
|
||||||
protocol.registerIncoming(State.PLAY, 0x18, 0x18, new PacketRemapper() {
|
protocol.registerIncoming(State.PLAY, 0x18, 0x18, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user