diff --git a/src/main/java/vazkii/botania/common/crafting/recipe/CompositeLensRecipe.java b/src/main/java/vazkii/botania/common/crafting/recipe/CompositeLensRecipe.java index 77535bdbd..81b11e045 100644 --- a/src/main/java/vazkii/botania/common/crafting/recipe/CompositeLensRecipe.java +++ b/src/main/java/vazkii/botania/common/crafting/recipe/CompositeLensRecipe.java @@ -65,7 +65,7 @@ public class CompositeLensRecipe implements IRecipe { if(lens.getItem() instanceof ICompositableLens) { ICompositableLens lensItem = (ICompositableLens) lens.getItem(); - if(secondLens.isEmpty() || !lensItem.canCombineLenses(lens, secondLens) || lensItem.getCompositeLens(lens) != null || lensItem.getCompositeLens(secondLens) != null) + if(secondLens.isEmpty() || !lensItem.canCombineLenses(lens, secondLens) || !lensItem.getCompositeLens(lens).isEmpty() || !lensItem.getCompositeLens(secondLens).isEmpty()) return ItemStack.EMPTY; ItemStack lensCopy = lens.copy(); diff --git a/src/main/java/vazkii/botania/common/crafting/recipe/CosmeticAttachRecipe.java b/src/main/java/vazkii/botania/common/crafting/recipe/CosmeticAttachRecipe.java index 138ef8d16..5af0ad9c1 100644 --- a/src/main/java/vazkii/botania/common/crafting/recipe/CosmeticAttachRecipe.java +++ b/src/main/java/vazkii/botania/common/crafting/recipe/CosmeticAttachRecipe.java @@ -34,7 +34,7 @@ public class CosmeticAttachRecipe implements IRecipe { if(stack.getItem() instanceof ICosmeticBauble && !foundCosmetic) foundCosmetic = true; else if(!foundAttachable) { - if(stack.getItem() instanceof ICosmeticAttachable && !(stack.getItem() instanceof ICosmeticBauble) && ((ICosmeticAttachable) stack.getItem()).getCosmeticItem(stack) == null) + if(stack.getItem() instanceof ICosmeticAttachable && !(stack.getItem() instanceof ICosmeticBauble) && ((ICosmeticAttachable) stack.getItem()).getCosmeticItem(stack).isEmpty()) foundAttachable = true; else return false; } @@ -53,7 +53,7 @@ public class CosmeticAttachRecipe implements IRecipe { for(int i = 0; i < var1.getSizeInventory(); i++) { ItemStack stack = var1.getStackInSlot(i); if(!stack.isEmpty()) { - if(stack.getItem() instanceof ICosmeticBauble && cosmeticItem == null) + if(stack.getItem() instanceof ICosmeticBauble && cosmeticItem.isEmpty()) cosmeticItem = stack; else attachableItem = stack; } diff --git a/src/main/java/vazkii/botania/common/crafting/recipe/CosmeticRemoveRecipe.java b/src/main/java/vazkii/botania/common/crafting/recipe/CosmeticRemoveRecipe.java index e4e71c26c..a7a06247d 100644 --- a/src/main/java/vazkii/botania/common/crafting/recipe/CosmeticRemoveRecipe.java +++ b/src/main/java/vazkii/botania/common/crafting/recipe/CosmeticRemoveRecipe.java @@ -30,7 +30,7 @@ public class CosmeticRemoveRecipe implements IRecipe { for(int i = 0; i < var1.getSizeInventory(); i++) { ItemStack stack = var1.getStackInSlot(i); if(!stack.isEmpty()) { - if(stack.getItem() instanceof ICosmeticAttachable && !(stack.getItem() instanceof ICosmeticBauble) && ((ICosmeticAttachable) stack.getItem()).getCosmeticItem(stack) != null) + if(stack.getItem() instanceof ICosmeticAttachable && !(stack.getItem() instanceof ICosmeticBauble) && !((ICosmeticAttachable) stack.getItem()).getCosmeticItem(stack).isEmpty()) foundAttachable = true; else return false; } @@ -51,11 +51,11 @@ public class CosmeticRemoveRecipe implements IRecipe { } ICosmeticAttachable attachable = (ICosmeticAttachable) attachableItem.getItem(); - if(attachable.getCosmeticItem(attachableItem) == null) + if(attachable.getCosmeticItem(attachableItem).isEmpty()) return ItemStack.EMPTY; ItemStack copy = attachableItem.copy(); - attachable.setCosmeticItem(copy, null); + attachable.setCosmeticItem(copy, ItemStack.EMPTY); return copy; }