3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-07-27 01:18:04 +02:00

Fix trade item rewrites

Dieser Commit ist enthalten in:
KennyTV 2019-07-06 19:36:50 +02:00
Ursprung 01018fe600
Commit c186d13ae5
2 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -185,7 +185,6 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
@Override
public void handle(PacketWrapper wrapper) throws Exception {
wrapper.write(Type.STRING, "minecraft:trader_list");
// wrapper.read(Type.STRING); // Remove channel
int windowId = wrapper.read(Type.VAR_INT);
wrapper.write(Type.INT, windowId);

Datei anzeigen

@ -70,13 +70,13 @@ public class InventoryPackets1_13_1 {
toClient(input);
//Output Item
Item output = wrapper.passthrough(Type.FLAT_ITEM);
toClient(input);
toClient(output);
boolean secondItem = wrapper.passthrough(Type.BOOLEAN); //Has second item
if (secondItem) {
//Second Item
Item second = wrapper.passthrough(Type.FLAT_ITEM);
toClient(input);
toClient(second);
}
wrapper.passthrough(Type.BOOLEAN); //Trade disabled