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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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