Fix potions not brewing as the correct type

This commit is contained in:
nossr50
2024-05-11 15:05:27 -07:00
parent 5ba6305ad4
commit fb0c8ec934
12 changed files with 135 additions and 35 deletions

View File

@@ -29,7 +29,10 @@ public class AlchemyBrewCheckTask extends CancellableRunnable {
boolean validBrew = brewingStand.getFuelLevel() > 0 && AlchemyPotionBrewer.isValidBrew(player, newInventory);
if (Alchemy.brewingStandMap.containsKey(location)) {
if (oldInventory[Alchemy.INGREDIENT_SLOT] == null || newInventory[Alchemy.INGREDIENT_SLOT] == null || !oldInventory[Alchemy.INGREDIENT_SLOT].isSimilar(newInventory[Alchemy.INGREDIENT_SLOT]) || !validBrew) {
if (oldInventory[Alchemy.INGREDIENT_SLOT] == null
|| newInventory[Alchemy.INGREDIENT_SLOT] == null
|| !oldInventory[Alchemy.INGREDIENT_SLOT].isSimilar(newInventory[Alchemy.INGREDIENT_SLOT])
|| !validBrew) {
Alchemy.brewingStandMap.get(location).cancelBrew();
}
} else if (validBrew) {