Jump to content

[Solved] [1.15.2] Global Loot Modifier Difficulties


Recommended Posts

Posted (edited)

As a pretext to adding some Items to various mob and chest loot tables, I decided to just modify the vanilla zombie loot table. I think things are Registering correctly, but I am getting some null pointer exceptions thrown whenever loot generation occurs. Not even for Zombies. Just random stuff. Here's the details:

Code/JSON items relevant to issue(I think):

https://github.com/nuke3d/NukesEcon/blob/master/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json

https://github.com/nuke3d/NukesEcon/blob/master/src/main/resources/data/nukesecon/loot_modifiers/zombie.json

https://github.com/nuke3d/NukesEcon/blob/master/src/main/java/com/nuke3dtv/nukesecon/data/LootTableModifier.java

https://github.com/nuke3d/NukesEcon/blob/master/src/main/java/com/nuke3dtv/nukesecon/setup/Registration.java

 

Exception detail:

[15:53:30] [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server
java.lang.NullPointerException: null
    at net.minecraft.world.storage.loot.conditions.EntityHasProperty.test(EntityHasProperty.java:32) ~[?:?] {re:classloading}
    at net.minecraft.world.storage.loot.conditions.EntityHasProperty.test(EntityHasProperty.java:18) ~[?:?] {re:classloading}
    at net.minecraftforge.common.loot.LootModifier.apply(LootModifier.java:53) ~[?:?] {re:classloading}
    at net.minecraftforge.common.ForgeHooks.modifyLoot(ForgeHooks.java:1194) ~[?:?] {re:classloading}
    at net.minecraft.world.storage.loot.LootTable.generate(LootTable.java:86) ~[?:?] {re:classloading}
    at net.minecraft.block.Block.getDrops(Block.java:622) ~[?:?] {re:classloading,pl:accesstransformer:B}...

 

Any guidance on where the problem is would be appreciated. I'll keep plugging away at it in the meantime. Thank you!

 

Edited by Nuke3d
Solved
Posted

Quick update. I created a flat world and used a spawn egg to spawn a zombie. Killed the zombie and the error occurred again, so there's definitely something wrong with my stuff.

 

Here is a more complete error log:

[19:08:01] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
net.minecraft.crash.ReportedException: Ticking entity
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:890) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:821) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:662) [?:?] {re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151] {}
Caused by: java.lang.NullPointerException
	at net.minecraft.world.storage.loot.conditions.EntityHasProperty.test(EntityHasProperty.java:32) ~[?:?] {re:classloading}
	at net.minecraft.world.storage.loot.conditions.EntityHasProperty.test(EntityHasProperty.java:18) ~[?:?] {re:classloading}
	at net.minecraftforge.common.loot.LootModifier.apply(LootModifier.java:53) ~[?:?] {re:classloading}
	at net.minecraftforge.common.ForgeHooks.modifyLoot(ForgeHooks.java:1194) ~[?:?] {re:classloading}
	at net.minecraft.world.storage.loot.LootTable.generate(LootTable.java:86) ~[?:?] {re:classloading}
	at net.minecraft.entity.LivingEntity.dropLoot(LivingEntity.java:1246) ~[?:?] {re:classloading}
	at net.minecraft.entity.MobEntity.dropLoot(MobEntity.java:471) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.entity.LivingEntity.spawnDrops(LivingEntity.java:1204) ~[?:?] {re:classloading}
	at net.minecraft.entity.LivingEntity.onDeath(LivingEntity.java:1165) ~[?:?] {re:classloading}
	at net.minecraft.entity.LivingEntity.attackEntityFrom(LivingEntity.java:1013) ~[?:?] {re:classloading}
	at net.minecraft.entity.monster.MonsterEntity.attackEntityFrom(MonsterEntity.java:68) ~[?:?] {re:classloading}
	at net.minecraft.entity.monster.ZombieEntity.attackEntityFrom(ZombieEntity.java:335) ~[?:?] {re:classloading}
	at net.minecraft.entity.Entity.baseTick(Entity.java:428) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.entity.LivingEntity.baseTick(LivingEntity.java:289) ~[?:?] {re:classloading}
	at net.minecraft.entity.MobEntity.baseTick(MobEntity.java:232) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.entity.Entity.tick(Entity.java:396) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.entity.LivingEntity.tick(LivingEntity.java:2184) ~[?:?] {re:classloading}
	at net.minecraft.entity.MobEntity.tick(MobEntity.java:311) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.entity.monster.ZombieEntity.tick(ZombieEntity.java:224) ~[?:?] {re:classloading}
	at net.minecraft.world.server.ServerWorld.updateEntity(ServerWorld.java:615) ~[?:?] {re:classloading}
	at net.minecraft.world.World.guardEntityTick(World.java:586) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.server.ServerWorld.tick(ServerWorld.java:404) ~[?:?] {re:classloading}
	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:886) ~[?:?] {re:classloading,pl:accesstransformer:B}
	... 4 more

 

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.