--- a/net/minecraft/world/inventory/BrewingStandMenu.java
+++ b/net/minecraft/world/inventory/BrewingStandMenu.java
@@ -14,8 +14,13 @@
 import net.minecraft.world.item.alchemy.Potion;
 import net.minecraft.world.item.alchemy.PotionBrewing;
 import net.minecraft.world.item.alchemy.PotionContents;
+// CraftBukkit start
+import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer;
+import org.bukkit.craftbukkit.inventory.view.CraftBrewingStandView;
+// CraftBukkit end
 
 public class BrewingStandMenu extends AbstractContainerMenu {
+
     private static final int BOTTLE_SLOT_START = 0;
     private static final int BOTTLE_SLOT_END = 2;
     private static final int INGREDIENT_SLOT = 3;
@@ -30,94 +35,108 @@
     private final ContainerData brewingStandData;
     private final Slot ingredientSlot;
 
+    // CraftBukkit start
+    private CraftBrewingStandView bukkitEntity = null;
+    private Inventory player;
+    // CraftBukkit end
+
     public BrewingStandMenu(int syncId, Inventory playerInventory) {
         this(syncId, playerInventory, new SimpleContainer(5), new SimpleContainerData(2));
     }
 
     public BrewingStandMenu(int syncId, Inventory playerInventory, Container inventory, ContainerData propertyDelegate) {
         super(MenuType.BREWING_STAND, syncId);
+        this.player = playerInventory; // CraftBukkit
         checkContainerSize(inventory, 5);
         checkContainerDataCount(propertyDelegate, 2);
         this.brewingStand = inventory;
         this.brewingStandData = propertyDelegate;
-        PotionBrewing potionBrewing = playerInventory.player.level().potionBrewing();
-        this.addSlot(new BrewingStandMenu.PotionSlot(inventory, 0, 56, 51));
-        this.addSlot(new BrewingStandMenu.PotionSlot(inventory, 1, 79, 58));
-        this.addSlot(new BrewingStandMenu.PotionSlot(inventory, 2, 102, 51));
-        this.ingredientSlot = this.addSlot(new BrewingStandMenu.IngredientsSlot(potionBrewing, inventory, 3, 79, 17));
+        PotionBrewing potionbrewer = playerInventory.player.level().potionBrewing();
+
+        // Paper start - custom potion mixes
+        this.addSlot(new BrewingStandMenu.PotionSlot(inventory, 0, 56, 51, potionbrewer));
+        this.addSlot(new BrewingStandMenu.PotionSlot(inventory, 1, 79, 58, potionbrewer));
+        this.addSlot(new BrewingStandMenu.PotionSlot(inventory, 2, 102, 51, potionbrewer));
+        // Paper end - custom potion mixes
+        this.ingredientSlot = this.addSlot(new BrewingStandMenu.IngredientsSlot(potionbrewer, inventory, 3, 79, 17));
         this.addSlot(new BrewingStandMenu.FuelSlot(inventory, 4, 17, 17));
         this.addDataSlots(propertyDelegate);
 
-        for (int i = 0; i < 3; i++) {
-            for (int j = 0; j < 9; j++) {
-                this.addSlot(new Slot(playerInventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
+        int j;
+
+        for (j = 0; j < 3; ++j) {
+            for (int k = 0; k < 9; ++k) {
+                this.addSlot(new Slot(playerInventory, k + j * 9 + 9, 8 + k * 18, 84 + j * 18));
             }
         }
 
-        for (int k = 0; k < 9; k++) {
-            this.addSlot(new Slot(playerInventory, k, 8 + k * 18, 142));
+        for (j = 0; j < 9; ++j) {
+            this.addSlot(new Slot(playerInventory, j, 8 + j * 18, 142));
         }
+
     }
 
     @Override
     public boolean stillValid(Player player) {
+        if (!this.checkReachable) return true; // CraftBukkit
         return this.brewingStand.stillValid(player);
     }
 
     @Override
     public ItemStack quickMoveStack(Player player, int slot) {
-        ItemStack itemStack = ItemStack.EMPTY;
-        Slot slot2 = this.slots.get(slot);
-        if (slot2 != null && slot2.hasItem()) {
-            ItemStack itemStack2 = slot2.getItem();
-            itemStack = itemStack2.copy();
+        ItemStack itemstack = ItemStack.EMPTY;
+        Slot slot1 = (Slot) this.slots.get(slot);
+
+        if (slot1 != null && slot1.hasItem()) {
+            ItemStack itemstack1 = slot1.getItem();
+
+            itemstack = itemstack1.copy();
             if ((slot < 0 || slot > 2) && slot != 3 && slot != 4) {
-                if (BrewingStandMenu.FuelSlot.mayPlaceItem(itemStack)) {
-                    if (this.moveItemStackTo(itemStack2, 4, 5, false)
-                        || this.ingredientSlot.mayPlace(itemStack2) && !this.moveItemStackTo(itemStack2, 3, 4, false)) {
+                if (BrewingStandMenu.FuelSlot.mayPlaceItem(itemstack)) {
+                    if (this.moveItemStackTo(itemstack1, 4, 5, false) || this.ingredientSlot.mayPlace(itemstack1) && !this.moveItemStackTo(itemstack1, 3, 4, false)) {
                         return ItemStack.EMPTY;
                     }
-                } else if (this.ingredientSlot.mayPlace(itemStack2)) {
-                    if (!this.moveItemStackTo(itemStack2, 3, 4, false)) {
+                } else if (this.ingredientSlot.mayPlace(itemstack1)) {
+                    if (!this.moveItemStackTo(itemstack1, 3, 4, false)) {
                         return ItemStack.EMPTY;
                     }
-                } else if (BrewingStandMenu.PotionSlot.mayPlaceItem(itemStack)) {
-                    if (!this.moveItemStackTo(itemStack2, 0, 3, false)) {
+                } else if (BrewingStandMenu.PotionSlot.mayPlaceItem(itemstack, this.player.player.level().potionBrewing())) { // Paper - custom potion mixes
+                    if (!this.moveItemStackTo(itemstack1, 0, 3, false)) {
                         return ItemStack.EMPTY;
                     }
                 } else if (slot >= 5 && slot < 32) {
-                    if (!this.moveItemStackTo(itemStack2, 32, 41, false)) {
+                    if (!this.moveItemStackTo(itemstack1, 32, 41, false)) {
                         return ItemStack.EMPTY;
                     }
                 } else if (slot >= 32 && slot < 41) {
-                    if (!this.moveItemStackTo(itemStack2, 5, 32, false)) {
+                    if (!this.moveItemStackTo(itemstack1, 5, 32, false)) {
                         return ItemStack.EMPTY;
                     }
-                } else if (!this.moveItemStackTo(itemStack2, 5, 41, false)) {
+                } else if (!this.moveItemStackTo(itemstack1, 5, 41, false)) {
                     return ItemStack.EMPTY;
                 }
             } else {
-                if (!this.moveItemStackTo(itemStack2, 5, 41, true)) {
+                if (!this.moveItemStackTo(itemstack1, 5, 41, true)) {
                     return ItemStack.EMPTY;
                 }
 
-                slot2.onQuickCraft(itemStack2, itemStack);
+                slot1.onQuickCraft(itemstack1, itemstack);
             }
 
-            if (itemStack2.isEmpty()) {
-                slot2.setByPlayer(ItemStack.EMPTY);
+            if (itemstack1.isEmpty()) {
+                slot1.setByPlayer(ItemStack.EMPTY);
             } else {
-                slot2.setChanged();
+                slot1.setChanged();
             }
 
-            if (itemStack2.getCount() == itemStack.getCount()) {
+            if (itemstack1.getCount() == itemstack.getCount()) {
                 return ItemStack.EMPTY;
             }
 
-            slot2.onTake(player, itemStack);
+            slot1.onTake(player, itemstack);
         }
 
-        return itemStack;
+        return itemstack;
     }
 
     public int getFuel() {
@@ -128,22 +147,42 @@
         return this.brewingStandData.get(0);
     }
 
-    static class FuelSlot extends Slot {
-        public FuelSlot(Container inventory, int index, int x, int y) {
+    private static class PotionSlot extends Slot {
+
+        private final PotionBrewing potionBrewing; // Paper - custom potion mixes
+        public PotionSlot(Container inventory, int index, int x, int y, PotionBrewing potionBrewing) { // Paper - custom potion mixes
             super(inventory, index, x, y);
+            this.potionBrewing = potionBrewing; // Paper - custom potion mixes
         }
 
         @Override
         public boolean mayPlace(ItemStack stack) {
-            return mayPlaceItem(stack);
+            return PotionSlot.mayPlaceItem(stack, this.potionBrewing); // Paper - custom potion mixes
         }
 
-        public static boolean mayPlaceItem(ItemStack stack) {
-            return stack.is(Items.BLAZE_POWDER);
+        @Override
+        public int getMaxStackSize() {
+            return 1;
+        }
+
+        @Override
+        public void onTake(Player player, ItemStack stack) {
+            Optional<Holder<Potion>> optional = ((PotionContents) stack.getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY)).potion();
+
+            if (optional.isPresent() && player instanceof ServerPlayer entityplayer) {
+                CriteriaTriggers.BREWED_POTION.trigger(entityplayer, (Holder) optional.get());
+            }
+
+            super.onTake(player, stack);
+        }
+
+        public static boolean mayPlaceItem(ItemStack stack, PotionBrewing potionBrewing) { // Paper - custom potion mixes
+            return stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE) || potionBrewing.isCustomInput(stack); // Paper - Custom Potion Mixes
         }
     }
 
-    static class IngredientsSlot extends Slot {
+    private static class IngredientsSlot extends Slot {
+
         private final PotionBrewing potionBrewing;
 
         public IngredientsSlot(PotionBrewing brewingRecipeRegistry, Container inventory, int index, int x, int y) {
@@ -157,33 +196,32 @@
         }
     }
 
-    static class PotionSlot extends Slot {
-        public PotionSlot(Container inventory, int index, int x, int y) {
+    private static class FuelSlot extends Slot {
+
+        public FuelSlot(Container inventory, int index, int x, int y) {
             super(inventory, index, x, y);
         }
 
         @Override
         public boolean mayPlace(ItemStack stack) {
-            return mayPlaceItem(stack);
+            return FuelSlot.mayPlaceItem(stack);
         }
 
-        @Override
-        public int getMaxStackSize() {
-            return 1;
+        public static boolean mayPlaceItem(ItemStack stack) {
+            return stack.is(Items.BLAZE_POWDER);
         }
+    }
 
-        @Override
-        public void onTake(Player player, ItemStack stack) {
-            Optional<Holder<Potion>> optional = stack.getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY).potion();
-            if (optional.isPresent() && player instanceof ServerPlayer serverPlayer) {
-                CriteriaTriggers.BREWED_POTION.trigger(serverPlayer, optional.get());
-            }
-
-            super.onTake(player, stack);
+    // CraftBukkit start
+    @Override
+    public CraftBrewingStandView getBukkitView() {
+        if (this.bukkitEntity != null) {
+            return this.bukkitEntity;
         }
 
-        public static boolean mayPlaceItem(ItemStack stack) {
-            return stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE);
-        }
+        CraftInventoryBrewer inventory = new CraftInventoryBrewer(this.brewingStand);
+        this.bukkitEntity = new CraftBrewingStandView(this.player.player.getBukkitEntity(), inventory, this);
+        return this.bukkitEntity;
     }
+    // CraftBukkit end
 }
