Merge pull request #48 from chochem/add-null-check

Add a couple of null checks
This commit is contained in:
chochem authored and GitHub committed 2024-09-11 18:27:58 +01:00
commit 6429eea5d6
2 files changed
+15 -11

No files matched your search

@@ -426,14 +426,16 @@ public class CraftingManager {
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(Items.emerald), "xxx", "xxx", "xxx", 'x', "nuggetEmerald"));
GameRegistry.addRecipe(
new ShapedOreRecipe(
ItemInterface.getItemStack("apatite"),
"xxx",
"xxx",
"xxx",
'x',
Config.nuggets.getStackForType(NuggetType.APATITE)));
if (ItemInterface.getItemStack("apatite") != null) {
GameRegistry.addRecipe(
new ShapedOreRecipe(
ItemInterface.getItemStack("apatite"),
"xxx",
"xxx",
"xxx",
'x',
Config.nuggets.getStackForType(NuggetType.APATITE)));
}
output = Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY);
GameRegistry.addRecipe(
@@ -638,9 +638,11 @@ public class ThaumcraftHelper implements IModHelper {
new ItemStack(item.getItem(), 1, ForestryHelper.BlockResource.APATITE.ordinal()),
list.copy());
item = ItemInterface.getItemStack(ForestryHelper.Name, "apatite");
ThaumcraftApi.registerObjectTag(
new ItemStack(item.getItem(), 1, item.getItemDamage()),
list.copy().add(Aspect.CRYSTAL, 2));
if (item != null) {
ThaumcraftApi.registerObjectTag(
new ItemStack(item.getItem(), 1, item.getItemDamage()),
list.copy().add(Aspect.CRYSTAL, 2));
}
list = new AspectList().add(Aspect.MOTION, 2).add(Aspect.FLIGHT, 1);
item = ItemInterface.getItemStack("beeDroneGE");