mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 12:19:46 +00:00
Fixed the finicky Timeless Ivy recepies
This commit is contained in:
1 parent
38be53e7bf
commit
d1d878b6b9
1 file changed
+15
-8
@@ -27,21 +27,28 @@ public class RegenIvyRecipe implements IRecipe {
|
||||
ItemStack tool = null;
|
||||
boolean foundIvy = false;
|
||||
int materialsFound = 0;
|
||||
for(int i = 0; i < var1.getSizeInventory(); i++) {
|
||||
ItemStack stack = var1.getStackInSlot(i);
|
||||
if (stack != null) {
|
||||
Item item = stack.getItem();
|
||||
if(item.isRepairable())
|
||||
tool = stack;
|
||||
|
||||
else if(item == ModItems.regenIvy)
|
||||
foundIvy = true;
|
||||
|
||||
}
|
||||
}
|
||||
for(int i = 0; i < var1.getSizeInventory(); i++) {
|
||||
ItemStack stack = var1.getStackInSlot(i);
|
||||
if(stack != null) {
|
||||
Item item = stack.getItem();
|
||||
if(item.isRepairable())
|
||||
tool = stack;
|
||||
Item item = stack.getItem();
|
||||
|
||||
else if(stack.getItem() == ModItems.regenIvy)
|
||||
foundIvy = true;
|
||||
|
||||
else if(tool != null && tool.getItem().getIsRepairable(tool, stack))
|
||||
if(tool != null && tool.getItem().getIsRepairable(tool, stack))
|
||||
materialsFound++;
|
||||
|
||||
else return false; // Found an invalid item, breaking the recipe
|
||||
else if(stack!=tool && item!=ModItems.regenIvy )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user