LyraelRayne / StacysWolves

Wolves for Stacy's Let's Play
5 stars 4 forks source link

Spawning Issue #44

Closed Zatiejo closed 4 years ago

Zatiejo commented 4 years ago

Hi.

I noticed this being an open issue already, but I didn't want to respond in case it would differ from the original issue from this one.

Basically, whenever I load into the server, this error would fill and spam my console instantly:

02.09 21:16:10 [Server] WARN java.lang.reflect.InvocationTargetException 02.09 21:16:10 [Server] WARN at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 02.09 21:16:10 [Server] WARN at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 02.09 21:16:10 [Server] WARN at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 02.09 21:16:10 [Server] WARN at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 02.09 21:16:10 [Server] WARN at net.minecraft.world.SpawnerAnimals.func_77192_a(SpawnerAnimals.java:197) 02.09 21:16:10 [Server] WARN at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:257) 02.09 21:16:10 [Server] WARN at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:963) 02.09 21:16:10 [Server] WARN at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:432) 02.09 21:16:10 [Server] WARN at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:841) 02.09 21:16:10 [Server] WARN at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:693) 02.09 21:16:10 [Server] WARN at java.lang.Thread.run(Thread.java:748) 02.09 21:16:10 [Server] WARN Caused by: java.lang.NullPointerException 02.09 21:16:10 [Server] WARN at au.lyrael.stacywolves.entity.wolf.EntityWolfBase.isCreatureType(EntityWolfBase.java:1313) 02.09 21:16:10 [Server] WARN at org.spigotmc.ActivationRange.initializeEntityActivationType(ActivationRange.java:59) 02.09 21:16:10 [Server] WARN at net.minecraft.entity.Entity.(Entity.java:180) 02.09 21:16:10 [Server] WARN at net.minecraft.entity.EntityLivingBase.(EntityLivingBase.java:139) 02.09 21:16:10 [Server] WARN at net.minecraft.entity.EntityLiving.(EntityLiving.java:75) 02.09 21:16:10 [Server] WARN at net.minecraft.entity.EntityCreature.(EntityCreature.java:38) 02.09 21:16:10 [Server] WARN at net.minecraft.entity.EntityAgeable.(EntityAgeable.java:47) 02.09 21:16:10 [Server] WARN at net.minecraft.entity.passive.EntityAnimal.(SourceFile:26) 02.09 21:16:10 [Server] WARN at net.minecraft.entity.passive.EntityTameable.(SourceFile:23) 02.09 21:16:10 [Server] WARN at au.lyrael.stacywolves.entity.wolf.EntityWolfBase.(EntityWolfBase.java:99) 02.09 21:16:10 [Server] WARN at au.lyrael.stacywolves.entity.wolf.EntitySubterraneanWolfBase.(EntitySubterraneanWolfBase.java:10) 02.09 21:16:10 [Server] WARN at au.lyrael.stacywolves.entity.wolf.EntityIronWolf.(EntityIronWolf.java:43) 02.09 21:16:10 [Server] WARN ... 11 more

I'm assuming it's something about not being able to load in the wolves either it be a certain mod preventing it from doing so, or an issue with the world. I decided that maybe it was a certain wolf. However, no matter what egg I use, it always kicks me out of the server with the reason of "Internal Server Error" or something like that. I have a cut and exact moment of the server loading up in the given latest.log file below.

latest.log

You might notice the server is running on Thermos, a server jar that allows servers to run bukkit plugins while running forge mods at the same time. I made sure all files such as plugins and mods are up to date, especially the Stacy's Wolves Mod file. Thermos is running on Thermos-1.7.10-1614-58. In the console it tells me that Thermos-1.7.10-1614-57 is the latest update instead of this one because 58 is a pre-release while 57 is a recent full release of the jar file. However, both seem to work just fine, being able to install all the mods and plugins. The only problem with what I'm seeing is spawning in the wolves either natural or manually.

I'm not sure if this happens on regular forge servers (with out the bukkit part) because it works either way.

If you're curious here's the link to the pre-release (58)- https://github.com/CyberdyneCC/Thermos/releases/tag/58 Then here's the full latest release - https://github.com/CyberdyneCC/Thermos/releases/tag/57 Just in case your curious or you'd like more info on Thermos Thermos: https://cyberdynecc.github.io/Thermos/install

Here is the list of mods being used in the server: Mods installed

Here is the list of plugins being used in the server: Plugins installed

If you need more info, I might be able to help. Take your time to respond or figure this out. There's no rush! Thanks.

LyraelRayne commented 4 years ago

Thanks to your excellent and detailed bug report I was able to identify the issue (which does in fact look like the same issue as in #42). Spigot and/or Thermos changes the way Entities are initialised, causing one of the functions on the entity to be called before the wolf has finished initialising. As such the wolf did not know what kind of entity it was, and everything crashed.

Thermos also removes commons-lang version 3 which the mod used, but didn't really need.

Please test the attached build which does not use commons-lang version 3 and which has a workaround for the incorrect initialisation behaviour. You will need to unzip it (GitHub won't let me upload a JAR directly)

Stacy'sWolvesMod-1.7.10-1.1.5-test01.jar.zip

Zatiejo commented 4 years ago

Everything is now working as intended! Thank you so much! This worked well. I appreciate the response and fix. Have a good one.