Fix null IItemstack being converted to air. I hope. Closes #1222

This commit is contained in:
drcrazy 2017-09-05 18:02:42 +03:00
parent 48c9371d77
commit 849f9fc07b
2 changed files with 6 additions and 2 deletions

View file

@ -46,8 +46,9 @@ public class CTIndustrialGrinder extends CTGeneric {
@ZenMethod
public static void addRecipe(IItemStack output1, IItemStack output2, IItemStack output3, IItemStack output4, IIngredient input1, IIngredient input2, ILiquidStack fluid, int ticktime, int euTick) {
ItemStack oInput1 = (ItemStack) CraftTweakerCompat.toObject(input1);
ItemStack oInput2 = (ItemStack) CraftTweakerCompat.toObject(input2);
// There is only one input slot in Industrial Grinder
//ItemStack oInput2 = (ItemStack) CraftTweakerCompat.toObject(input2);
FluidStack fluidStack = null;
if (fluid != null) {

View file

@ -44,6 +44,9 @@ import static crafttweaker.api.minecraft.CraftTweakerMC.getLiquidStack;
public class CraftTweakerCompat implements ICompatModule {
public static ItemStack toStack(IItemStack iStack) {
if (iStack == null){
return null;
}
return getItemStack(iStack);
}