From e3d6b488bb0cba223bc0259e17543982c392588d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 6 Apr 2019 17:16:42 +0200 Subject: [PATCH] today in "stupid reasons for null pointer exceptions" Closes #44 --- .../ellpeck/naturesaura/blocks/BlockProjectileGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockProjectileGenerator.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockProjectileGenerator.java index 4dbd16a5..96b6d9b0 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockProjectileGenerator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockProjectileGenerator.java @@ -51,8 +51,8 @@ public class BlockProjectileGenerator extends BlockContainerImpl implements ITES if (generator.nextSide != ray.sideHit) return; ResourceLocation name = EntityList.getKey(entity); - int amount = NaturesAuraAPI.PROJECTILE_GENERATIONS.get(name); - if (amount <= 0) + Integer amount = NaturesAuraAPI.PROJECTILE_GENERATIONS.get(name); + if (amount == null || amount <= 0) return; BlockPos spot = IAuraChunk.getLowestSpot(entity.world, pos, 35, pos);