Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • Author

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

 

  • Author

Thank you! I will see about handling it manually for now. Planning on going to 1.16 soon, but wasn't go to do that quite yet.

  • 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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.