Fix potion recipes not working on pre-1.12 servers (#3408)

This commit is contained in:
Kevin Ludwig 2022-11-18 18:36:18 +01:00 committed by GitHub
parent 5ddb0ad90a
commit 37931e4996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -629,6 +629,12 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
creativePacket.setContents(this.itemMappings.getCreativeItems());
upstream.sendPacket(creativePacket);
// Potion mixes are registered by default, as they are needed to be able to put ingredients into the brewing stand.
CraftingDataPacket craftingDataPacket = new CraftingDataPacket();
craftingDataPacket.setCleanRecipes(true);
craftingDataPacket.getPotionMixData().addAll(Registries.POTION_MIXES.get());
upstream.sendPacket(craftingDataPacket);
PlayStatusPacket playStatusPacket = new PlayStatusPacket();
playStatusPacket.setStatus(PlayStatusPacket.Status.PLAYER_SPAWN);
upstream.sendPacket(playStatusPacket);