Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Fix rewriting
Dieser Commit ist enthalten in:
Ursprung
3d1d73a81a
Commit
4cd70ee711
@ -77,6 +77,7 @@ public abstract class Type<T> implements ByteBufReader<T>, ByteBufWriter<T> {
|
|||||||
/* 1.13 Flat Item (no data) */
|
/* 1.13 Flat Item (no data) */
|
||||||
public static final Type<Item> FLAT_ITEM = new FlatItemType();
|
public static final Type<Item> FLAT_ITEM = new FlatItemType();
|
||||||
public static final Type<Item[]> FLAT_ITEM_ARRAY = new FlatItemArrayType();
|
public static final Type<Item[]> FLAT_ITEM_ARRAY = new FlatItemArrayType();
|
||||||
|
public static final Type<Item[]> FLAT_ITEM_ARRAY_VAR_INT = new ArrayType<>(FLAT_ITEM);
|
||||||
|
|
||||||
/* Actual Class */
|
/* Actual Class */
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ public class InventoryPackets {
|
|||||||
wrapper.passthrough(Type.STRING); // Group
|
wrapper.passthrough(Type.STRING); // Group
|
||||||
int ingredientsNo = wrapper.passthrough(Type.VAR_INT);
|
int ingredientsNo = wrapper.passthrough(Type.VAR_INT);
|
||||||
for (int i1 = 0; i1 < ingredientsNo; i1++) {
|
for (int i1 = 0; i1 < ingredientsNo; i1++) {
|
||||||
Item[] items = wrapper.passthrough(Type.FLAT_ITEM_ARRAY);
|
Item[] items = wrapper.passthrough(Type.FLAT_ITEM_ARRAY_VAR_INT);
|
||||||
for (int i2 = 0; i2 < items.length; i2++) {
|
for (int i2 = 0; i2 < items.length; i2++) {
|
||||||
InventoryPackets.toClient(items[i2]);
|
InventoryPackets.toClient(items[i2]);
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ public class InventoryPackets {
|
|||||||
int ingredientsNo = wrapper.passthrough(Type.VAR_INT) * wrapper.passthrough(Type.VAR_INT);
|
int ingredientsNo = wrapper.passthrough(Type.VAR_INT) * wrapper.passthrough(Type.VAR_INT);
|
||||||
wrapper.passthrough(Type.STRING); // Group
|
wrapper.passthrough(Type.STRING); // Group
|
||||||
for (int i1 = 0; i1 < ingredientsNo; i1++) {
|
for (int i1 = 0; i1 < ingredientsNo; i1++) {
|
||||||
Item[] items = wrapper.passthrough(Type.FLAT_ITEM_ARRAY);
|
Item[] items = wrapper.passthrough(Type.FLAT_ITEM_ARRAY_VAR_INT);
|
||||||
for (int i2 = 0; i2 < items.length; i2++) {
|
for (int i2 = 0; i2 < items.length; i2++) {
|
||||||
InventoryPackets.toClient(items[i2]);
|
InventoryPackets.toClient(items[i2]);
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ public class InventoryPackets {
|
|||||||
} else if (type.equals("smelting")) {
|
} else if (type.equals("smelting")) {
|
||||||
wrapper.passthrough(Type.STRING); // Group
|
wrapper.passthrough(Type.STRING); // Group
|
||||||
// Ingredient start
|
// Ingredient start
|
||||||
Item[] items = wrapper.passthrough(Type.FLAT_ITEM_ARRAY);
|
Item[] items = wrapper.passthrough(Type.FLAT_ITEM_ARRAY_VAR_INT);
|
||||||
for (int i2 = 0; i2 < items.length; i2++) {
|
for (int i2 = 0; i2 < items.length; i2++) {
|
||||||
InventoryPackets.toClient(items[i2]);
|
InventoryPackets.toClient(items[i2]);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren