Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-09-07 21:32:52 +02:00
Fix trade item rewrites
Dieser Commit ist enthalten in:
Ursprung
01018fe600
Commit
c186d13ae5
@ -185,7 +185,6 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
|
|||||||
@Override
|
@Override
|
||||||
public void handle(PacketWrapper wrapper) throws Exception {
|
public void handle(PacketWrapper wrapper) throws Exception {
|
||||||
wrapper.write(Type.STRING, "minecraft:trader_list");
|
wrapper.write(Type.STRING, "minecraft:trader_list");
|
||||||
// wrapper.read(Type.STRING); // Remove channel
|
|
||||||
|
|
||||||
int windowId = wrapper.read(Type.VAR_INT);
|
int windowId = wrapper.read(Type.VAR_INT);
|
||||||
wrapper.write(Type.INT, windowId);
|
wrapper.write(Type.INT, windowId);
|
||||||
|
@ -70,13 +70,13 @@ public class InventoryPackets1_13_1 {
|
|||||||
toClient(input);
|
toClient(input);
|
||||||
//Output Item
|
//Output Item
|
||||||
Item output = wrapper.passthrough(Type.FLAT_ITEM);
|
Item output = wrapper.passthrough(Type.FLAT_ITEM);
|
||||||
toClient(input);
|
toClient(output);
|
||||||
|
|
||||||
boolean secondItem = wrapper.passthrough(Type.BOOLEAN); //Has second item
|
boolean secondItem = wrapper.passthrough(Type.BOOLEAN); //Has second item
|
||||||
if (secondItem) {
|
if (secondItem) {
|
||||||
//Second Item
|
//Second Item
|
||||||
Item second = wrapper.passthrough(Type.FLAT_ITEM);
|
Item second = wrapper.passthrough(Type.FLAT_ITEM);
|
||||||
toClient(input);
|
toClient(second);
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapper.passthrough(Type.BOOLEAN); //Trade disabled
|
wrapper.passthrough(Type.BOOLEAN); //Trade disabled
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren