As I was going about the task of porting my mod to 1.7, I encountered a NullPointerException in my TickHandler.
The Stack was:
java.lang.NullPointerException
at tk.cephlab.sa4.tick.TickHandlerClient.tickStart(TickHandlerClient.java:48)
at tk.cephlab.sa4.EventHandlerSA.onTic(EventHandlerSA.java:31)
So I went to see where this exception originated and I found it came from "world.loadedEntityList.iterator()," as shown in the code below:
The Stack was:
So I went to see where this exception originated and I found it came from "world.loadedEntityList.iterator()," as shown in the code below:
This, however, is not an iterator() issue. I had the same issue using a for loop.
This worked in 1.6.4, and shouldn't have changed. I have no idea what could be causing this, or any alternatives to getting all the entities.
Click Here to view my WIP Mod!
Currently developing a Tech/Space mod. PM if you can/want to help!
Maybe entityList isn't initialised when your tick method starts being called so it ends up referring to a null object only on the first tick.