diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_2to1_21/storage/RecipeStorage.java b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_2to1_21/storage/RecipeStorage.java index eecb0e2e..2b581b46 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_2to1_21/storage/RecipeStorage.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_2to1_21/storage/RecipeStorage.java @@ -40,8 +40,8 @@ public final class RecipeStorage implements StorableObject { // Pairs of open + filtering for: Crafting, furnace, blast furnace, smoker public static final int RECIPE_BOOK_SETTINGS = 4 * 2; private static final String[] EMPTY_STRINGS = new String[0]; - private final List recipes = new ArrayList<>(); - private final List tempRecipes = new ArrayList<>(); + private final List recipes = new ArrayList<>(); // Recipes, excluding stone cutter recipes, in the order they were received + private final List tempRecipes = new ArrayList<>(); // Recipes received in the current batch private final List stoneCutterRecipes = new ArrayList<>(); private boolean[] recipeBookSettings = new boolean[RECIPE_BOOK_SETTINGS]; private final Protocol1_21_2To1_21 protocol; @@ -58,7 +58,6 @@ public final class RecipeStorage implements StorableObject { private Integer group; private int category; private boolean highlight; - private boolean locked; abstract void write(PacketWrapper wrapper); @@ -142,7 +141,7 @@ public final class RecipeStorage implements StorableObject { public void lockRecipes(final PacketWrapper wrapper, final int[] ids) { for (final int id : ids) { - recipes.get(id).locked = true; + recipes.removeIf(recipe -> recipe.index == id); } wrapper.write(Types.VAR_INT, 2); // Remove recipes