LootBags

LootBags

31M Downloads

[1.11.2] NullPointerException with JEI

Andronomos opened this issue ยท 3 comments

commented

Crash while clicking on bags in JEI. Can't remember if it happened when clicking with the left mouse button or the U key to see uses (I was going back and fourth through the bags looking at their loot tables in JER).

Version: LootBags-1.11.2-2.4.1

Crash Report: crash-2017-07-27_04.41.09-server.txt

java.lang.NullPointerException: Ticking entity
at mal.lootbags.handler.BagHandler.isBagEmpty(BagHandler.java:119)
at mal.lootbags.item.LootbagItem.getEntityLifespan(LootbagItem.java:446)
at net.minecraftforge.event.ForgeEventFactory.onItemExpire(ForgeEventFactory.java:433)
at net.minecraft.entity.item.EntityItem.func_70071_h_(EntityItem.java:183)
at net.minecraft.world.World.func_72866_a(World.java:1965)
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:840)
at net.minecraft.world.World.func_72870_g(World.java:1934)
at net.minecraft.world.World.func_72939_s(World.java:1748)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:621)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:720)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:624)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:149)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at java.lang.Thread.run(Thread.java:745)

commented

Just found it also crashes the world on load.

Crash Log: crash-2017-07-27_06.23.40-server.txt

commented

That is not an JEI issue. It looks like an item in the world expired, and either thought it was a bag and isn't, or is a bag with an ID that doesn't match the current bag set. I'll put in some handling in the next version to prevent similar issues and that should fix the problem.

commented

This was on a brand new world, I hadn't done much of anything yet. I was sitting in JEI looking at advanced tooltips to set up my custom loot tables in the bag config. Though I did run the entity kill command once so it's possible there was a bag on the ground. Also, I had modified the lootbags_bag config to remove the extra bags after legendary so it's possible one of those bags was on the ground. I would imagine that's a scenario that could lead to the problem you described. Though I've rarely ever had those bags drop and it was over 5minutes since the command was ran so they should have despawned.

I guess I need to recreate the world or delete all entities in the loaded chunk with a world editor.

Thanks for the update.

Edit: Nvm, the update fixed the world :)