![Rough Mobs Revamped](https://media.forgecdn.net/avatars/thumbnails/247/41/256/256/637161034679470158.png)
[Bug] - Crash null pointer (enchantment on null entry?)
0xebjc opened this issue ยท 2 comments
I think that now that there is a
here's the backtrace, I can submit the full crash log if you want, but I'm looking at your 2 TODO's in the EquipHelper and thinking that since the entry can be returned as null: then the enchantment function is trying to enchant a null.
// If entity is in wrong dimension, then don't return entries
if (!isDimension(entity, dimension)) {
entry = null;
return entry;
}
Caused by: java.lang.NullPointerException
at knightminer.inspirations.tools.enchantment.EnchantmentAxeLooting.func_92089_a(EnchantmentAxeLooting.java:25) ~[EnchantmentAxeLooting.class:?]
at de.lellson.roughmobs2.misc.EquipHelper$EquipmentPool.getRandom(EquipHelper.java:353) ~[EquipHelper$EquipmentPool.class:1.12.2-2.2.7]
at de.lellson.roughmobs2.misc.EquipHelper$EquipmentApplier.equipEntity(EquipHelper.java:158) ~[EquipHelper$EquipmentApplier.class:1.12.2-2.2.7]
at de.lellson.roughmobs2.features.SkeletonFeatures.addFeatures(SkeletonFeatures.java:122) ~[SkeletonFeatures.class:1.12.2-2.2.7]
at de.lellson.roughmobs2.RoughApplier.onEntitySpawn(RoughApplier.java:155) ~[RoughApplier.class:1.12.2-2.2.7]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1083_RoughApplier_onEntitySpawn_EntityJoinWorldEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?]
at net.minecraft.world.World.func_72838_d(World.java:1209) ~[amu.class:?]
at net.minecraft.world.WorldServer.func_72838_d(WorldServer.java:1058) ~[oo.class:?]
at net.minecraft.world.WorldEntitySpawner.func_77192_a(WorldEntitySpawner.java:160) ~[anb.class:?]
at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:203) ~[oo.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:756) ~[MinecraftServer.class:?]
I pulled your latest 2.2.8 and compiled, no crashes so far, but the probability of equipment seems off, I've set to 1 (always equip) for weapons and armor and it is still random and not always equipping items, what seems to be happening is that one piece or armor always gets equipped, but not the whole set, maybe that was the reason for the those loops (int =10, or int =100) that you have TODO's ro work out?