3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-08 01:00:15 +01:00

Fix position shifting, fix two layers of item copy

Dieser Commit ist enthalten in:
creeper123123321 2019-11-27 16:38:42 -03:00
Ursprung de97b5b15f
Commit 875d2392b5
3 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -24,6 +24,6 @@ public class Position1_14Type extends Type<Position> {
public void write(ByteBuf buffer, Position object) {
buffer.writeLong((((long) object.getX() & 0x3ffffff) << 38)
| (object.getY() & 0xfff)
| ((object.getZ() & 0x3ffffff) << 12));
| ((((long) object.getZ()) & 0x3ffffff) << 12));
}
}

Datei anzeigen

@ -23,7 +23,7 @@ public class PositionType extends Type<Position> {
@Override
public void write(ByteBuf buffer, Position object) {
buffer.writeLong((((long) object.getX() & 0x3ffffff) << 38)
| ((object.getY() & 0xfff) << 26)
| ((((long) object.getY()) & 0xfff) << 26)
| (object.getZ() & 0x3ffffff));
}
}

Datei anzeigen

@ -515,7 +515,7 @@ public class Protocol1_13To1_12_2 extends Protocol {
Item[] clone = ingredient.clone(); // Clone because array and item is mutable
for (int i = 0; i < clone.length; i++) {
if (clone[i] == null) continue;
clone[i] = new Item(new Item(clone[i]));
clone[i] = new Item(clone[i]);
}
wrapper.write(Type.FLAT_ITEM_ARRAY_VAR_INT, clone);
}
@ -530,7 +530,7 @@ public class Protocol1_13To1_12_2 extends Protocol {
Item[] clone = ingredient.clone(); // Clone because array and item is mutable
for (int i = 0; i < clone.length; i++) {
if (clone[i] == null) continue;
clone[i] = new Item(new Item(clone[i]));
clone[i] = new Item(clone[i]);
}
wrapper.write(Type.FLAT_ITEM_ARRAY_VAR_INT, clone);
}