1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Did the requested changes.

This commit is contained in:
LinoxGH 2020-06-24 22:33:55 +03:00
parent 776dc2a302
commit 4249a2b85b

View File

@ -116,8 +116,8 @@ public class AutoBrewer extends AContainer {
if (input1 == null || input2 == null) return null; if (input1 == null || input2 == null) return null;
if (input1.getType().name().endsWith("POTION") || input2.getType().name().endsWith("POTION")) { if (isPotion(input1.getType()) || isPotion(input2.getType())) {
boolean slot = input1.getType().name().endsWith("POTION"); boolean slot = isPotion(input1.getType());
ItemStack pItem = slot ? input1 : input2; ItemStack pItem = slot ? input1 : input2;
ItemStack iItem = slot ? input2 : input1; ItemStack iItem = slot ? input2 : input1;
@ -169,6 +169,10 @@ public class AutoBrewer extends AContainer {
} else return null; } else return null;
} }
private boolean isPotion(Material mat) {
return mat == Material.POTION || mat == Material.SPLASH_POTION || mat == Material.LINGERING_POTION;
}
@Override @Override
public String getInventoryTitle() { public String getInventoryTitle() {
return "&6Auto-Brewer"; return "&6Auto-Brewer";