3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00
Dieser Commit ist enthalten in:
creeper123123321 2018-08-22 17:27:21 -03:00
Ursprung 3d1d73a81a
Commit 4cd70ee711
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -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 */

Datei anzeigen

@ -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]);
} }