BTW-Community / Mobs-Enhancement-Addon

A Minecraft Better Than Wolves addon that aims to slightly strengthen monsters.
7 stars 0 forks source link

Massive Null Pointer Exceptions #10

Closed TGuigz closed 2 months ago

TGuigz commented 3 months ago

Noticed massive amounts of null pointer exceptions that fill the console. Seems to be only certain chunks. Idk if it is spawners causing it or just certain mobs.

java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor37.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at net.minecraft.class_867.method_2571(class_867.java:85) at net.minecraft.class_1586.method_5483(class_1586.java:331) at net.minecraft.class_594.method_5242(class_594.java:22) at net.minecraft.class_594.method_1618(class_594.java:17) at net.minecraft.class_594.method_1631(class_594.java:12) at net.minecraft.class_598.method_1625(class_598.java:160) at net.minecraft.class_598.method_1626(class_598.java:145) at net.minecraft.class_530.method_1370(class_530.java:464) at net.minecraft.class_524.method_1326(class_524.java:1155) at net.minecraft.class_524.method_1331(class_524.java:985) at net.minecraft.class_1600.method_2916(class_1600.java:979) at net.minecraft.class_1600.run(class_1600.java:872) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NullPointerException at net.pottx.mobsenhancement.MEAUtils.getGameProgressMobsLevel(MEAUtils.java:280) at btw.entity.mob.SpiderEntity.handler$zcd000$addNaturalPotion(SpiderEntity.java:526) at btw.entity.mob.SpiderEntity.(SpiderEntity.java:23) at btw.entity.mob.CaveSpiderEntity.(CaveSpiderEntity.java:13) ... 16 more java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor37.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at net.minecraft.class_867.method_2571(class_867.java:85) at net.minecraft.class_1586.method_5483(class_1586.java:331) at net.minecraft.class_594.method_5242(class_594.java:22) at net.minecraft.class_594.method_1618(class_594.java:17) at net.minecraft.class_594.method_1631(class_594.java:12) at net.minecraft.class_598.method_1625(class_598.java:160) at net.minecraft.class_598.method_1626(class_598.java:145) at net.minecraft.class_530.method_1370(class_530.java:464) at net.minecraft.class_524.method_1326(class_524.java:1155) at net.minecraft.class_524.method_1331(class_524.java:985) at net.minecraft.class_1600.method_2916(class_1600.java:979) at net.minecraft.class_1600.run(class_1600.java:872) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NullPointerException at net.pottx.mobsenhancement.MEAUtils.getGameProgressMobsLevel(MEAUtils.java:280) at btw.entity.mob.SpiderEntity.handler$zcd000$addNaturalPotion(SpiderEntity.java:526) at btw.entity.mob.SpiderEntity.(SpiderEntity.java:23) at btw.entity.mob.CaveSpiderEntity.(CaveSpiderEntity.java:13) ... 16 more java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at net.minecraft.class_867.method_2571(class_867.java:85) at net.minecraft.class_1586.method_5483(class_1586.java:331) at net.minecraft.class_594.method_5242(class_594.java:22) at net.minecraft.class_594.method_1618(class_594.java:17) at net.minecraft.class_594.method_1631(class_594.java:12) at net.minecraft.class_598.method_1625(class_598.java:160) at net.minecraft.class_598.method_1626(class_598.java:145) at net.minecraft.class_530.method_1370(class_530.java:464) at net.minecraft.class_524.method_1326(class_524.java:1155) at net.minecraft.class_524.method_1331(class_524.java:985) at net.minecraft.class_1600.method_2916(class_1600.java:979) at net.minecraft.class_1600.run(class_1600.java:872) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NullPointerException at net.pottx.mobsenhancement.MEAUtils.getGameProgressMobsLevel(MEAUtils.java:280) at btw.entity.mob.ZombieEntity.method_2599(ZombieEntity.java:607) at net.minecraft.class_871.(class_871.java:81) at net.minecraft.class_877.(class_877.java:30) at net.minecraft.class_975.(class_975.java:7) at net.minecraft.class_982.(class_982.java:20) at btw.entity.mob.ZombieEntity.(ZombieEntity.java:27) ... 16 more

nicknewbie2k3 commented 2 months ago

Ye I also got this problem, it starts slowing the world tps down again like the previous version

Pot-Tx commented 2 months ago

Seems to be caused by spider spawners, are you using the latest 0.2.2-ffiixx? Because I remember fixing this, looks like the same issue.

ITLSupress commented 2 months ago

Can confirm this is happening on 0.2.2-ffiixx as reported by Elle as well, seems that it no longer happens with zombie spawners but some weird behavior still occurs.

Arminias commented 2 months ago

The issue is here: https://github.com/BTW-Community/Mobs-Enhancement-Addon/blob/master/src/main/java/net/pottx/mobsenhancement/mixin/SpiderEntityMixin.java#L40 (This is also called on <init> of the Entity; a world null check is missing)

Pot-Tx commented 2 months ago

The issue is here: https://github.com/BTW-Community/Mobs-Enhancement-Addon/blob/master/src/main/java/net/pottx/mobsenhancement/mixin/SpiderEntityMixin.java#L40 (This is also called on <init> of the Entity; a world null check is missing)

Oh yeah I see, thank you!

Pot-Tx commented 2 months ago

I reuploaded 0.3.0, it should be fixed now. Sorry for keeping this bug for so long!