mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-22 00:17:37 +01:00
Fix 1.13 recipe ingredient writing
This commit is contained in:
parent
1785677901
commit
896c6accfb
@ -775,7 +775,10 @@ public class Protocol1_12_2To1_13 extends AbstractProtocol<ClientboundPackets1_1
|
||||
for (Item[] ingredient : recipe.ingredients()) {
|
||||
Item[] clone = new Item[ingredient.length];
|
||||
for (int i = 0; i < ingredient.length; i++) {
|
||||
if (clone[i] == null) continue;
|
||||
if (ingredient[i] == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
clone[i] = ingredient[i].copy();
|
||||
}
|
||||
recipesPacket.write(Types.ITEM1_13_ARRAY, clone);
|
||||
@ -789,7 +792,10 @@ public class Protocol1_12_2To1_13 extends AbstractProtocol<ClientboundPackets1_1
|
||||
for (Item[] ingredient : recipe.ingredients()) {
|
||||
Item[] clone = new Item[ingredient.length];
|
||||
for (int i = 0; i < ingredient.length; i++) {
|
||||
if (clone[i] == null) continue;
|
||||
if (ingredient[i] == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
clone[i] = ingredient[i].copy();
|
||||
}
|
||||
recipesPacket.write(Types.ITEM1_13_ARRAY, clone);
|
||||
@ -800,7 +806,10 @@ public class Protocol1_12_2To1_13 extends AbstractProtocol<ClientboundPackets1_1
|
||||
recipesPacket.write(Types.STRING, recipe.group());
|
||||
Item[] ingredient = new Item[recipe.ingredient().length];
|
||||
for (int i = 0; i < ingredient.length; i++) {
|
||||
if (recipe.ingredient()[i] == null) continue;
|
||||
if (recipe.ingredient()[i] == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ingredient[i] = recipe.ingredient()[i].copy();
|
||||
}
|
||||
recipesPacket.write(Types.ITEM1_13_ARRAY, ingredient);
|
||||
|
Loading…
Reference in New Issue
Block a user