mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-10-22 05:53:43 +02:00
Second Smelt makes use of its own section in Bonus Drops in config.yml
Co-authored-by: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
@@ -54,7 +54,7 @@ public final class Alchemy {
|
||||
public static double catalysisMinSpeed = AdvancedConfig.getInstance().getCatalysisMinSpeed();
|
||||
public static double catalysisMaxSpeed = AdvancedConfig.getInstance().getCatalysisMaxSpeed();
|
||||
|
||||
public static Map<Location, AlchemyBrewTask> brewingStandMap = new HashMap<Location, AlchemyBrewTask>();
|
||||
public static Map<Location, AlchemyBrewTask> brewingStandMap = new HashMap<>();
|
||||
|
||||
private Alchemy() {}
|
||||
|
||||
@@ -64,7 +64,7 @@ public final class Alchemy {
|
||||
public static void finishAllBrews() {
|
||||
mcMMO.p.debug("Completing " + brewingStandMap.size() + " unfinished Alchemy brews.");
|
||||
|
||||
List<AlchemyBrewTask> toFinish = new ArrayList<AlchemyBrewTask>(brewingStandMap.values());
|
||||
List<AlchemyBrewTask> toFinish = new ArrayList<>(brewingStandMap.values());
|
||||
|
||||
for (AlchemyBrewTask alchemyBrewTask : toFinish) {
|
||||
alchemyBrewTask.finishImmediately();
|
||||
|
@@ -56,19 +56,19 @@ public final class AlchemyPotionBrewer {
|
||||
}
|
||||
|
||||
private static void removeIngredient(BrewerInventory inventory, Player player) {
|
||||
ItemStack ingredient = inventory.getIngredient() == null ? null : inventory.getIngredient().clone();
|
||||
if(inventory.getIngredient() == null)
|
||||
return;
|
||||
|
||||
if (isEmpty(ingredient) || !isValidIngredient(player, ingredient)) {
|
||||
return;
|
||||
}
|
||||
else if (ingredient.getAmount() <= 1) {
|
||||
inventory.setIngredient(null);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
ingredient.setAmount(ingredient.getAmount() - 1);
|
||||
inventory.setIngredient(ingredient);
|
||||
return;
|
||||
ItemStack ingredient = inventory.getIngredient().clone();
|
||||
|
||||
if (isEmpty(ingredient) && !isValidIngredient(player, ingredient)) {
|
||||
if (ingredient.getAmount() <= 1) {
|
||||
inventory.setIngredient(null);
|
||||
}
|
||||
else {
|
||||
ingredient.setAmount(ingredient.getAmount() - 1);
|
||||
inventory.setIngredient(ingredient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public final class AlchemyPotionBrewer {
|
||||
return;
|
||||
}
|
||||
|
||||
List<AlchemyPotion> inputList = new ArrayList<AlchemyPotion>();
|
||||
List<AlchemyPotion> inputList = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
ItemStack item = inventory.getItem(i);
|
||||
|
Reference in New Issue
Block a user