From 6a6dfdfbebce5917584aa900cec2b9379654e9fb Mon Sep 17 00:00:00 2001 From: blocksimus <336769374+blocksimus@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:31:32 +1100 Subject: [PATCH] fix: keep stonecutter recipes in server order The recipe cache kept stonecutter recipes in a hash set, which shuffled them. Clients pick a recipe by its index, so you'd get the wrong item (stone brick stairs kept giving me stone slabs). Using a list fixes it. --- src/main/java/com/zenith/cache/data/recipe/RecipeCache.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/zenith/cache/data/recipe/RecipeCache.java b/src/main/java/com/zenith/cache/data/recipe/RecipeCache.java index 7ad42178d..3bf25000e 100644 --- a/src/main/java/com/zenith/cache/data/recipe/RecipeCache.java +++ b/src/main/java/com/zenith/cache/data/recipe/RecipeCache.java @@ -5,7 +5,6 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectMaps; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import lombok.Data; import lombok.experimental.Accessors; import org.geysermc.mcprotocollib.network.packet.Packet; @@ -26,7 +25,7 @@ @Accessors(chain = true) public class RecipeCache implements CachedData { protected Map itemSets = new ConcurrentHashMap<>(); - protected Set stoneCutterRecipes = Collections.synchronizedSet(new ObjectOpenHashSet<>()); + protected List stoneCutterRecipes = Collections.synchronizedList(new ArrayList<>()); protected Map recipeBookSettings = Collections.synchronizedMap(new EnumMap<>(CraftingBookStateType.class)); protected Int2ObjectMap recipeBookEntries = Int2ObjectMaps.synchronize(new Int2ObjectOpenHashMap<>());