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:
nossr50
2020-07-13 12:31:30 -07:00
parent 7eae59a0b3
commit fdd951f1f1
176 changed files with 642 additions and 604 deletions

View File

@@ -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();

View File

@@ -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);