mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
Fix #383 Fermenter crash when opening the gui
This commit is contained in:
1 parent
08555326b2
commit
46348fca07
1 file changed
+6
-6
@@ -30,6 +30,7 @@ import forestry.core.interfaces.ILiquidTankContainer;
|
||||
import forestry.core.inventory.TileInventoryAdapter;
|
||||
import forestry.core.network.GuiId;
|
||||
import forestry.core.utils.EnumTankLevel;
|
||||
import forestry.core.utils.StackUtils;
|
||||
import forestry.core.utils.Utils;
|
||||
import forestry.factory.triggers.FactoryTriggers;
|
||||
import java.util.ArrayList;
|
||||
@@ -145,12 +146,11 @@ public class MachineFermenter extends TilePowered implements ISidedInventory, IL
|
||||
}
|
||||
|
||||
public static boolean isResource(ItemStack resource) {
|
||||
for (int i = 0; i < recipes.size(); i++) {
|
||||
Recipe recipe = recipes.get(i);
|
||||
if (recipe.resource.getItemDamage() == Defaults.WILDCARD
|
||||
&& recipe.resource.getItem() == resource.getItem())
|
||||
return true;
|
||||
else if (recipe.resource.isItemEqual(resource))
|
||||
if (resource == null)
|
||||
return false;
|
||||
|
||||
for (Recipe recipe : recipes) {
|
||||
if (StackUtils.isCraftingEquivalent(recipe.resource, resource))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user