net.minecraft.client

## Class Minecraft

- java.lang.Object
- - net.minecraft.client.Minecraft

- All Implemented Interfaces:
    IPlayerUsage

      public class Minecraft
      extends Object
      implements IPlayerUsage

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `GuiScreen` | `currentScreen` The GuiScreen that's being displayed at the moment.
    `String` | `debug` String that shows the debug information
    `int` | `displayHeight`
    `int` | `displayWidth`
    `EffectRenderer` | `effectRenderer`
    `EntityRenderer` | `entityRenderer`
    `FontRenderer` | `fontRenderer` The font renderer used for displaying and measuring text.
    `GameSettings` | `gameSettings` The game settings that currently hold effect.
    `GuiAchievement` | `guiAchievement` Gui achievement
    `GuiIngame` | `ingameGUI`
    `boolean` | `inGameHasFocus` Does the actual gameplay have focus.
    `static boolean` | `isRunningOnMac`
    `LoadingScreenRenderer` | `loadingScreen`
    `File` | `mcDataDir`
    `Profiler` | `mcProfiler` The profiler instance
    `static byte[]` | `memoryReserve` A 10MiB preallocation to ensure the heap is reasonably sized.
    `MouseHelper` | `mouseHelper` Mouse helper instance.
    `MovingObjectPosition` | `objectMouseOver` The ray trace hit that the mouse is over.
    `PlayerControllerMP` | `playerController`
    `EntityLivingBase` | `pointedEntityLiving`
    `TextureManager` | `renderEngine` The RenderEngine instance used by Minecraft
    `RenderGlobal` | `renderGlobal`
    `EntityLivingBase` | `renderViewEntity` The Entity from which the renderer determines the render viewpoint.
    `boolean` | `running` Set to true to keep the game loop running.
    `boolean` | `skipRenderWorld` Skip render world
    `SoundManager` | `sndManager`
    `FontRenderer` | `standardGalacticFontRenderer`
    `StatFileWriter` | `statFileWriter` Stat file writer
    `EntityClientPlayerMP` | `thePlayer`
    `WorldClient` | `theWorld`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Minecraft(Session par1Session, int par2, int par3, boolean par4, boolean par5, File par6File, File par7File, File par8File, Proxy par9Proxy, String par10Str)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CrashReport` | `addGraphicsAndWorldToCrashReport(CrashReport par1CrashReport)` adds core server Info (GL version , Texture pack, isModded, type), and the worldInfo to the crash report
    `void` | `addServerStatsToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper)`
    `void` | `addServerTypeToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper)`
    `void` | `continueWorldLoading()`
    `void` | `crashed(CrashReport par1CrashReport)`
    `String` | `debugInfoEntities()` A String of how many entities are in the world
    `String` | `debugInfoRenders()` A String of renderGlobal.getDebugInfoRenders
    `void` | `displayCrashReport(CrashReport par1CrashReport)` Wrapper around displayCrashReportInternal
    `void` | `displayGuiScreen(GuiScreen par1GuiScreen)` Sets the argument GuiScreen as the main (topmost visible) screen.
    `void` | `displayInGameMenu()` Displays the ingame menu
    `void` | `freeMemory()`
    `String` | `getEntityDebug()` Gets the information in the F3 menu about how many entities are infront/around you
    `static int` | `getGLMaximumTextureSize()` Used in the usage snooper.
    `IntegratedServer` | `getIntegratedServer()` Returns the currently running integrated server
    `LanguageManager` | `getLanguageManager()`
    `ILogAgent` | `getLogAgent()`
    `static Minecraft` | `getMinecraft()` Return the singleton Minecraft instance for the game
    `NetClientHandler` | `getNetHandler()` Returns the NetClientHandler.
    `PlayerUsageSnooper` | `getPlayerUsageSnooper()` Returns the PlayerUsageSnooper instance.
    `Proxy` | `getProxy()`
    `ResourceManager` | `getResourceManager()`
    `ResourcePackRepository` | `getResourcePackRepository()`
    `ISaveFormat` | `getSaveLoader()` Returns the save loader that is currently being used
    `Session` | `getSession()`
    `static long` | `getSystemTime()` Gets the system time in milliseconds.
    `TextureManager` | `getTextureManager()`
    `String` | `getWorldProviderName()` Gets the name of the world's current chunk provider
    `boolean` | `handleClientCommand(String par1Str)` Returns true if the message is a client command and should not be sent to the server.
    `static boolean` | `isAmbientOcclusionEnabled()` Returns if ambient occlusion is enabled
    `boolean` | `isDemo()` Gets whether this is a demo or not.
    `static boolean` | `isFancyGraphicsEnabled()`
    `boolean` | `isFullScreen()` Returns whether we're in full screen or not.
    `static boolean` | `isGuiEnabled()`
    `boolean` | `isIntegratedServerRunning()`
    `boolean` | `isSingleplayer()` Returns true if there is only one player playing, and the current server is the integrated one.
    `boolean` | `isSnooperEnabled()` Returns whether snooping is enabled or not.
    `void` | `launchIntegratedServer(String par1Str, String par2Str, WorldSettings par3WorldSettings)` Arguments: World foldername, World ingame name, WorldSettings
    `void` | `loadWorld(WorldClient par1WorldClient)` unloads the current world first
    `void` | `loadWorld(WorldClient par1WorldClient, String par2Str)` par2Str is displayed on the loading screen to the user unloads the current world first
    `void` | `refreshResources()`
    `void` | `run()`
    `void` | `runTick()` Runs the current tick.
    `void` | `scaledTessellator(int par1, int par2, int par3, int par4, int par5, int par6)` Loads Tessellator with a scaled resolution
    `void` | `setDimensionAndSpawnPlayer(int par1)`
    `void` | `setIngameFocus()` Will set the focus to ingame if the Minecraft window is the active with focus.
    `void` | `setIngameNotInFocus()` Resets the player keystate, disables the ingame focus, and ungrabs the mouse cursor.
    `void` | `setServer(String par1Str, int par2)`
    `void` | `setServerData(ServerData par1ServerData)` Set the current ServerData instance.
    `void` | `shutdown()` Called when the window is closing.
    `void` | `shutdownMinecraftApplet()` Shuts down the minecraft applet by stopping the resource downloads, and clearing up GL stuff; called when the application (or web page) is exited.
    `static void` | `stopIntegratedServer()`
    `void` | `toggleFullscreen()` Toggles fullscreen mode.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### isRunningOnMac

          public static final boolean isRunningOnMac

    - #### memoryReserve

          public static byte[] memoryReserve

      A 10MiB preallocation to ensure the heap is reasonably sized.

    - #### renderEngine

          public TextureManager renderEngine

      The RenderEngine instance used by Minecraft

    - #### playerController

          public PlayerControllerMP playerController

    - #### displayWidth

          public int displayWidth

    - #### displayHeight

          public int displayHeight

    - #### theWorld

          public WorldClient theWorld

    - #### renderGlobal

          public RenderGlobal renderGlobal

    - #### thePlayer

          public EntityClientPlayerMP thePlayer

    - #### renderViewEntity

          public EntityLivingBase renderViewEntity

      The Entity from which the renderer determines the render viewpoint. Currently is always the parent Minecraft class's 'thePlayer' instance. Modification of its location, rotation, or other settings at render time will modify the camera likewise, with the caveat of triggering chunk rebuilds as it moves, making it unsuitable for changing the viewpoint mid-render.

    - #### pointedEntityLiving

          public EntityLivingBase pointedEntityLiving

    - #### effectRenderer

          public EffectRenderer effectRenderer

    - #### fontRenderer

          public FontRenderer fontRenderer

      The font renderer used for displaying and measuring text.

    - #### standardGalacticFontRenderer

          public FontRenderer standardGalacticFontRenderer

    - #### currentScreen

          public GuiScreen currentScreen

      The GuiScreen that's being displayed at the moment.

    - #### loadingScreen

          public LoadingScreenRenderer loadingScreen

    - #### entityRenderer

          public EntityRenderer entityRenderer

    - #### guiAchievement

          public GuiAchievement guiAchievement

      Gui achievement

    - #### ingameGUI

          public GuiIngame ingameGUI

    - #### skipRenderWorld

          public boolean skipRenderWorld

      Skip render world

    - #### objectMouseOver

          public MovingObjectPosition objectMouseOver

      The ray trace hit that the mouse is over.

    - #### gameSettings

          public GameSettings gameSettings

      The game settings that currently hold effect.

    - #### sndManager

          public SoundManager sndManager

    - #### mouseHelper

          public MouseHelper mouseHelper

      Mouse helper instance.

    - #### mcDataDir

          public final File mcDataDir

    - #### statFileWriter

          public StatFileWriter statFileWriter

      Stat file writer

    - #### inGameHasFocus

          public boolean inGameHasFocus

      Does the actual gameplay have focus. If so then mouse and keys will effect the player instead of menus.

    - #### mcProfiler

          public final Profiler mcProfiler

      The profiler instance

    - #### running

          public volatile boolean running

      Set to true to keep the game loop running. Set to false by shutdown() to allow the game loop to exit cleanly.

    - #### debug

          public String debug

      String that shows the debug information

  - ### Constructor Detail

    - #### Minecraft

          public Minecraft(Session par1Session,
                   int par2,
                   int par3,
                   boolean par4,
                   boolean par5,
                   File par6File,
                   File par7File,
                   File par8File,
                   Proxy par9Proxy,
                   String par10Str)

  - ### Method Detail

    - #### crashed

          public void crashed(CrashReport par1CrashReport)

    - #### displayCrashReport

          public void displayCrashReport(CrashReport par1CrashReport)

      Wrapper around displayCrashReportInternal

    - #### setServer

          public void setServer(String par1Str,
                       int par2)

    - #### refreshResources

          public void refreshResources()

    - #### scaledTessellator

          public void scaledTessellator(int par1,
                               int par2,
                               int par3,
                               int par4,
                               int par5,
                               int par6)

      Loads Tessellator with a scaled resolution

    - #### getSaveLoader

          public ISaveFormat getSaveLoader()

      Returns the save loader that is currently being used

    - #### displayGuiScreen

          public void displayGuiScreen(GuiScreen par1GuiScreen)

      Sets the argument GuiScreen as the main (topmost visible) screen.

    - #### shutdownMinecraftApplet

          public void shutdownMinecraftApplet()

      Shuts down the minecraft applet by stopping the resource downloads, and clearing up GL stuff; called when the application (or web page) is exited.

    - #### run

          public void run()

    - #### freeMemory

          public void freeMemory()

    - #### shutdown

          public void shutdown()

      Called when the window is closing. Sets 'running' to false which allows the game loop to exit cleanly.

    - #### setIngameFocus

          public void setIngameFocus()

      Will set the focus to ingame if the Minecraft window is the active with focus. Also clears any GUI screen currently displayed

    - #### setIngameNotInFocus

          public void setIngameNotInFocus()

      Resets the player keystate, disables the ingame focus, and ungrabs the mouse cursor.

    - #### displayInGameMenu

          public void displayInGameMenu()

      Displays the ingame menu

    - #### toggleFullscreen

          public void toggleFullscreen()

      Toggles fullscreen mode.

    - #### runTick

          public void runTick()

      Runs the current tick.

    - #### launchIntegratedServer

          public void launchIntegratedServer(String par1Str,
                                    String par2Str,
                                    WorldSettings par3WorldSettings)

      Arguments: World foldername, World ingame name, WorldSettings

    - #### continueWorldLoading

          public void continueWorldLoading()

    - #### loadWorld

          public void loadWorld(WorldClient par1WorldClient)

      unloads the current world first

    - #### loadWorld

          public void loadWorld(WorldClient par1WorldClient,
                       String par2Str)

      par2Str is displayed on the loading screen to the user unloads the current world first

    - #### debugInfoRenders

          public String debugInfoRenders()

      A String of renderGlobal.getDebugInfoRenders

    - #### getEntityDebug

          public String getEntityDebug()

      Gets the information in the F3 menu about how many entities are infront/around you

    - #### getWorldProviderName

          public String getWorldProviderName()

      Gets the name of the world's current chunk provider

    - #### debugInfoEntities

          public String debugInfoEntities()

      A String of how many entities are in the world

    - #### setDimensionAndSpawnPlayer

          public void setDimensionAndSpawnPlayer(int par1)

    - #### isDemo

          public final boolean isDemo()

      Gets whether this is a demo or not.

    - #### getNetHandler

          public NetClientHandler getNetHandler()

      Returns the NetClientHandler.

    - #### isGuiEnabled

          public static boolean isGuiEnabled()

    - #### isFancyGraphicsEnabled

          public static boolean isFancyGraphicsEnabled()

    - #### isAmbientOcclusionEnabled

          public static boolean isAmbientOcclusionEnabled()

      Returns if ambient occlusion is enabled

    - #### handleClientCommand

          public boolean handleClientCommand(String par1Str)

      Returns true if the message is a client command and should not be sent to the server. However there are no such commands at this point in time.

    - #### addGraphicsAndWorldToCrashReport

          public CrashReport addGraphicsAndWorldToCrashReport(CrashReport par1CrashReport)

      adds core server Info (GL version , Texture pack, isModded, type), and the worldInfo to the crash report

    - #### getMinecraft

          public static Minecraft getMinecraft()

      Return the singleton Minecraft instance for the game

    - #### addServerStatsToSnooper

          public void addServerStatsToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper)

      Specified by:
        `addServerStatsToSnooper` in interface `IPlayerUsage`

    - #### addServerTypeToSnooper

          public void addServerTypeToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper)

      Specified by:
        `addServerTypeToSnooper` in interface `IPlayerUsage`

    - #### getGLMaximumTextureSize

          public static int getGLMaximumTextureSize()

      Used in the usage snooper.

    - #### isSnooperEnabled

          public boolean isSnooperEnabled()

      Returns whether snooping is enabled or not.
      Specified by:
        `isSnooperEnabled` in interface `IPlayerUsage`

    - #### setServerData

          public void setServerData(ServerData par1ServerData)

      Set the current ServerData instance.

    - #### isIntegratedServerRunning

          public boolean isIntegratedServerRunning()

    - #### isSingleplayer

          public boolean isSingleplayer()

      Returns true if there is only one player playing, and the current server is the integrated one.

    - #### getIntegratedServer

          public IntegratedServer getIntegratedServer()

      Returns the currently running integrated server

    - #### stopIntegratedServer

          public static void stopIntegratedServer()

    - #### getPlayerUsageSnooper

          public PlayerUsageSnooper getPlayerUsageSnooper()

      Returns the PlayerUsageSnooper instance.

    - #### getSystemTime

          public static long getSystemTime()

      Gets the system time in milliseconds.

    - #### isFullScreen

          public boolean isFullScreen()

      Returns whether we're in full screen or not.

    - #### getLogAgent

          public ILogAgent getLogAgent()

      Specified by:
        `getLogAgent` in interface `IPlayerUsage`

    - #### getSession

          public Session getSession()

    - #### getProxy

          public Proxy getProxy()

    - #### getTextureManager

          public TextureManager getTextureManager()

    - #### getResourceManager

          public ResourceManager getResourceManager()

    - #### getResourcePackRepository

          public ResourcePackRepository getResourcePackRepository()

    - #### getLanguageManager

          public LanguageManager getLanguageManager()