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

Fix villager trading on 1.11 #534

Dieser Commit ist enthalten in:
Myles 2016-11-14 22:17:23 +00:00
Ursprung d277701caa
Commit fa348fbc23

Datei anzeigen

@ -81,14 +81,14 @@ public class InventoryPackets {
if (wrapper.get(Type.STRING, 0).equalsIgnoreCase("MC|TrList")) {
wrapper.passthrough(Type.INT); // Passthrough Window ID
int size = wrapper.passthrough(Type.BYTE);
int size = wrapper.passthrough(Type.UNSIGNED_BYTE)
for (int i = 0; i < size; i++) {
ItemRewriter.toClient(wrapper.read(Type.ITEM)); // Input Item
ItemRewriter.toClient(wrapper.read(Type.ITEM)); // Output Item
ItemRewriter.toClient(wrapper.passthrough(Type.ITEM)); // Input Item
ItemRewriter.toClient(wrapper.passthrough(Type.ITEM)); // Output Item
boolean secondItem = wrapper.passthrough(Type.BOOLEAN); // Has second item
if (secondItem)
ItemRewriter.toClient(wrapper.read(Type.ITEM)); // Second Item
ItemRewriter.toClient(wrapper.passthrough(Type.ITEM)); // Second Item
wrapper.passthrough(Type.BOOLEAN); // Trade disabled
wrapper.passthrough(Type.INT); // Number of tools uses