Hi,
I am creating dimensions on the fly and using a teleporter code similar to that of mystcraft to change dimension. The problem is that there is quite a significant delay between initiating the request and actually getting teleported to the dimension. (due to generating the chunks)
How do I show a custom "Downloading terrain" screen that says "Loading stuff" during the delay?
Steve
I am getting
Time: 6/22/15 5:19 PM
Description: Initializing game
java.lang.NullPointerException: Initializing game
at com.ssttevee.blockbank.EventHookContainer.onGuiOpen(EventHookContainer.java:27)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_8_EventHookContainer_onGuiOpen_GuiOpenEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:55)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:961)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:538)
at net.minecraft.client.Minecraft.run(Minecraft.java:356)
at net.minecraft.client.main.Main.main(Main.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at com.ssttevee.blockbank.EventHookContainer.onGuiOpen(EventHookContainer.java:27)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_8_EventHookContainer_onGuiOpen_GuiOpenEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:55)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:961)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:538)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:356)
at net.minecraft.client.main.Main.main(Main.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
relevant code
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event) {
if(event.gui instanceof GuiMainMenu) {
System.out.println(Minecraft.getMinecraft().thePlayer.getGameProfile());
}
}
Is there an event that runs when the main menu is started or after initialization completes where I can get the players uuid??
While I'm at it, how do I verify that the user is actually logged in though mojang?