Posted March 24, 201510 yr So basically, I need to use a method in Minecraft.class, I know that you can't just use it like "Minecraft.doSomething()" because I need to use the specific instance of Minecraft.class that is created by Main.class, only thing is, this is how the instance is created: (new Minecraft(gameconfiguration)).run(); Is there a way in Java to get the instance of a class that was not created as a variable?
March 24, 201510 yr You need Minecraft.getMinecraft(). If you have read the constructor of class Minecraft, you would find it. Author of Tao Land Mod. http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img] Also, author of RenderTo ---- I'm not an English native speaker. I just try my best.
March 24, 201510 yr Author Sorry, still kinda new to Forge. No, I did not read the constructor. God, I feel like an Idiot right now... I even remember seeing .getMinecraft() used somewhere.......
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.