mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 03:39:09 +00:00
Fix #367 Fix fabricator crash
This commit is contained in:
1 parent
a68cbc54e7
commit
d8beaa92b9
1 file changed
+2
-3
@@ -412,14 +412,13 @@ public class MachineFabricator extends TilePowered implements ICrafter, ISpecial
|
||||
public boolean hasWork() {
|
||||
ItemStack itemToMelt = inventory.getStackInSlot(SLOT_METAL);
|
||||
Smelting smelting = RecipeManager.findMatchingSmelting(itemToMelt);
|
||||
FluidStack liquid = smelting.getProduct();
|
||||
if (moltenTank.fill(liquid, false) > 0)
|
||||
if (smelting != null && moltenTank.fill(smelting.getProduct(), false) > 0)
|
||||
return true;
|
||||
|
||||
ItemStack plan = inventory.getStackInSlot(SLOT_PLAN);
|
||||
ItemStack[] resources = inventory.getStacks(SLOT_CRAFTING_1, SLOT_CRAFTING_COUNT);
|
||||
|
||||
return RecipeManager.findMatchingRecipe(plan, liquid, resources) != null;
|
||||
return RecipeManager.findMatchingRecipe(plan, moltenTank.getFluid(), resources) != null;
|
||||
}
|
||||
|
||||
public int getHeatScaled(int i) {
|
||||
|
||||
Reference in new issue
Block a user