Skip to content

Fix stonecutter recipes being registered multiple times#6150

Open
valaphee wants to merge 6 commits intoGeyserMC:masterfrom
valaphee:stonecutter-recipe-duplicate
Open

Fix stonecutter recipes being registered multiple times#6150
valaphee wants to merge 6 commits intoGeyserMC:masterfrom
valaphee:stonecutter-recipe-duplicate

Conversation

@valaphee
Copy link
Contributor

@valaphee valaphee commented Jan 30, 2026

Sending ClientboundUpdateRecipesPacket should reset the recipes, as seen here

public void handleUpdateRecipes(ClientboundUpdateRecipesPacket clientboundUpdateRecipesPacket) {
    PacketUtils.ensureRunningOnSameThread(clientboundUpdateRecipesPacket, this, this.minecraft.packetProcessor());
    this.recipes = new ClientRecipeContainer(clientboundUpdateRecipesPacket.itemSets(), clientboundUpdateRecipesPacket.stonecutterRecipes());
}

but Geyser registers them as duplicates, while still wiping out the old stonecutter recipes which causes inventory action mismatches as the first recipe is always chosen.

One solution would be to allow duplicates, but not wipe out the old stonecutter recipes, but if a recipe changes or being prepended it will not work.
Another one is to track the CraftingData on the server and send full CraftingDataPackets when ClientboundUpdateRecipesPacket is sent.
Last solution would be to increment the priority with each ClientboundUpdateRecipesPacket.

@valaphee valaphee force-pushed the stonecutter-recipe-duplicate branch from d6c26ba to bb26ff2 Compare January 30, 2026 17:14
@valaphee valaphee force-pushed the stonecutter-recipe-duplicate branch from c1cdba1 to ec7734b Compare January 30, 2026 17:43
@valaphee valaphee force-pushed the stonecutter-recipe-duplicate branch from 6113d5f to bbc7218 Compare February 5, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant