Fixed NPE with no resourceLocation

This commit is contained in:
Jared 2018-03-03 00:54:59 +02:00
parent 3a444d2dce
commit b11d3ea95e

View file

@ -16,8 +16,8 @@ import stanhebben.zenscript.annotations.*;
public class AlchemyArray {
@ZenMethod
public static void addRecipe(IItemStack output, IItemStack input, IItemStack catalyst, @Optional String textureLocation) {
ModTweaker.LATE_ADDITIONS.add(new Add(InputHelper.toStack(input), InputHelper.toStack(catalyst), InputHelper.toStack(output), new ResourceLocation(textureLocation)));
public static void addRecipe(IItemStack output, IItemStack input, IItemStack catalyst, @Optional String textureLocation) {
ModTweaker.LATE_ADDITIONS.add(new Add(InputHelper.toStack(input), InputHelper.toStack(catalyst), InputHelper.toStack(output), textureLocation !=null ? new ResourceLocation(textureLocation) : null));
}
@ZenMethod