Issue description
I can never get my MapScreens to create due to issues in the console, and under some investigation, it seems out of my control.
To reproduce
session.updateScreen(); //Update the screen.
session.screen.spawnFrames(player); //Spawn the frames.
session.screen.sendMaps(true, player); //Send the maps to the player.
This is my code, the session.updateScreen() handles the screen update and spawnFrames(player) SHOULD spawn the frames- but it doesn't, instead it throws a null pointer saying this.frames is not set. I looked into your Map Screen class and it attempts to get this.frames[x][y] but the this.frames variable was never setup within the class whatsoever, so therefore it just keeps throwing errors upon attempting to create it.
Expected behaviour
For map screens to actually show and not throw a null pointer.
Screenshots / videos
Look into MapScreen.java to see what I mean, it's pretty self-explanatory, but here's the log as well I keep getting.
java.lang.NullPointerException: Cannot load from object array because "this.frames" is null at com.legacymc.legacyrp.libraries.maps.api.MapScreen.spawnFrames(MapScreen.java:191) ~[LegacyRP-0.0.1.jar:?]
Additional information
No response
Issue description
I can never get my MapScreens to create due to issues in the console, and under some investigation, it seems out of my control.
To reproduce
This is my code, the
session.updateScreen()handles the screen update andspawnFrames(player)SHOULD spawn the frames- but it doesn't, instead it throws a null pointer sayingthis.framesis not set. I looked into your Map Screen class and it attempts to getthis.frames[x][y]but thethis.framesvariable was never setup within the class whatsoever, so therefore it just keeps throwing errors upon attempting to create it.Expected behaviour
For map screens to actually show and not throw a null pointer.
Screenshots / videos
Look into MapScreen.java to see what I mean, it's pretty self-explanatory, but here's the log as well I keep getting.
java.lang.NullPointerException: Cannot load from object array because "this.frames" is null at com.legacymc.legacyrp.libraries.maps.api.MapScreen.spawnFrames(MapScreen.java:191) ~[LegacyRP-0.0.1.jar:?]Additional information
No response