mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	This commit is contained in:
		@@ -344,13 +344,6 @@ public class PotionConfig extends LegacyConfigLoader {
 | 
			
		||||
                .stream()
 | 
			
		||||
                .filter(potion -> potion.isSimilarPotion(item, itemMeta))
 | 
			
		||||
                .toList();
 | 
			
		||||
        if(potionList.size() > 1) {
 | 
			
		||||
            mcMMO.p.getLogger().severe("Multiple potions defined in config have matched this potion, for mcMMO to behave" +
 | 
			
		||||
                    " properly there should only be one match found.");
 | 
			
		||||
            mcMMO.p.getLogger().severe("Potion ItemStack:" + item.toString());
 | 
			
		||||
            mcMMO.p.getLogger().severe("Alchemy Potions from config matching this item: "
 | 
			
		||||
                    + potionList.stream().map(AlchemyPotion::toString).collect(Collectors.joining(", ")));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return potionList.isEmpty() ? null : potionList.get(0);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -189,18 +189,18 @@ public final class AlchemyPotionBrewer {
 | 
			
		||||
 | 
			
		||||
        // Process each of the three slots in the brewing stand
 | 
			
		||||
        for (int i = 0; i < 3; i++) {
 | 
			
		||||
            ItemStack item = inventory.getItem(i);
 | 
			
		||||
            final ItemStack potionInBrewStandInputSlot = inventory.getItem(i);
 | 
			
		||||
 | 
			
		||||
            // Skip the slot if it's empty, contains a glass bottle, or holds an invalid potion
 | 
			
		||||
            if (isEmpty(item)
 | 
			
		||||
                    || item.getType() == Material.GLASS_BOTTLE
 | 
			
		||||
                    || !mcMMO.p.getPotionConfig().isValidPotion(item)) {
 | 
			
		||||
            if (isEmpty(potionInBrewStandInputSlot)
 | 
			
		||||
                    || potionInBrewStandInputSlot.getType() == Material.GLASS_BOTTLE
 | 
			
		||||
                    || !mcMMO.p.getPotionConfig().isValidPotion(potionInBrewStandInputSlot)) {
 | 
			
		||||
                // debug
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Retrieve the potion configurations for the input and resulting output potion
 | 
			
		||||
            AlchemyPotion input = mcMMO.p.getPotionConfig().getPotion(item);
 | 
			
		||||
            AlchemyPotion input = mcMMO.p.getPotionConfig().getPotion(potionInBrewStandInputSlot);
 | 
			
		||||
            AlchemyPotion output = input.getChild(ingredient);
 | 
			
		||||
 | 
			
		||||
            // Update the input list with the current potion
 | 
			
		||||
@@ -208,7 +208,7 @@ public final class AlchemyPotionBrewer {
 | 
			
		||||
 | 
			
		||||
            // If there is a valid output potion, add it to the output list
 | 
			
		||||
            if (output != null) {
 | 
			
		||||
                outputList.set(i, output.toItemStack(item.getAmount()).clone());
 | 
			
		||||
                outputList.set(i, output.toItemStack(potionInBrewStandInputSlot.getAmount()).clone());
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user