Fixes CraftTweaker support, closes #1303
This commit is contained in:
parent
b7b9cb9963
commit
e490669405
1 changed files with 3 additions and 3 deletions
|
@ -45,14 +45,14 @@ import static crafttweaker.api.minecraft.CraftTweakerMC.getLiquidStack;
|
||||||
public class CraftTweakerCompat implements ICompatModule {
|
public class CraftTweakerCompat implements ICompatModule {
|
||||||
public static ItemStack toStack(IItemStack iStack) {
|
public static ItemStack toStack(IItemStack iStack) {
|
||||||
if (iStack == null){
|
if (iStack == null){
|
||||||
return ItemStack.EMPTY;
|
return null;
|
||||||
}
|
}
|
||||||
return getItemStack(iStack);
|
return getItemStack(iStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object toObject(IIngredient iStack) {
|
public static Object toObject(IIngredient iStack) {
|
||||||
if (iStack == null)
|
if (iStack == null)
|
||||||
return ItemStack.EMPTY;
|
return null;
|
||||||
else {
|
else {
|
||||||
if (iStack instanceof IOreDictEntry)
|
if (iStack instanceof IOreDictEntry)
|
||||||
return ((IOreDictEntry) iStack).getName();
|
return ((IOreDictEntry) iStack).getName();
|
||||||
|
@ -62,7 +62,7 @@ public class CraftTweakerCompat implements ICompatModule {
|
||||||
IIngredient ingr = ReflectionHelper.getPrivateValue(IngredientStack.class, (IngredientStack) iStack, "ingredient");
|
IIngredient ingr = ReflectionHelper.getPrivateValue(IngredientStack.class, (IngredientStack) iStack, "ingredient");
|
||||||
return toObject(ingr);
|
return toObject(ingr);
|
||||||
} else
|
} else
|
||||||
return ItemStack.EMPTY;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue