Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Fix position shifting, fix two layers of item copy
Dieser Commit ist enthalten in:
Ursprung
de97b5b15f
Commit
875d2392b5
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren