3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 16:12:42 +01:00

Merge pull request #1242 from KennyTV/dev

Actually fix book opening
Dieser Commit ist enthalten in:
Myles 2019-04-04 19:32:40 +01:00 committet von GitHub
Commit 7fbbc5f4b8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 1 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -178,7 +178,6 @@ public class InventoryPackets {
wrapper.write(Type.VAR_INT, 0); wrapper.write(Type.VAR_INT, 0);
wrapper.write(Type.BOOLEAN, false); wrapper.write(Type.BOOLEAN, false);
} else if (channel.equals("minecraft:book_open") || channel.equals("book_open")) { } else if (channel.equals("minecraft:book_open") || channel.equals("book_open")) {
wrapper.read(Type.REMAINING_BYTES);
int hand = wrapper.read(Type.VAR_INT); int hand = wrapper.read(Type.VAR_INT);
wrapper.clearPacket(); wrapper.clearPacket();
wrapper.setId(0x2C); wrapper.setId(0x2C);

Datei anzeigen

@ -293,7 +293,7 @@ public class PlayerPackets {
public void handle(PacketWrapper wrapper) throws Exception { public void handle(PacketWrapper wrapper) throws Exception {
String name = wrapper.get(Type.STRING, 0); String name = wrapper.get(Type.STRING, 0);
if (name.equalsIgnoreCase("MC|BOpen")) { if (name.equalsIgnoreCase("MC|BOpen")) {
wrapper.passthrough(Type.REMAINING_BYTES); // This is so ugly, :( wrapper.read(Type.REMAINING_BYTES); // Not used anymore
wrapper.write(Type.VAR_INT, 0); wrapper.write(Type.VAR_INT, 0);
} }
if (name.equalsIgnoreCase("MC|TrList")) { if (name.equalsIgnoreCase("MC|TrList")) {