Class Minecraft

java.lang.Object
net.minecraft.src.Minecraft
All Implemented Interfaces:
IPlayerUsage

@Environment(CLIENT) public class Minecraft extends Object implements IPlayerUsage
  • Field Details

    • 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
    • legacyRenderHandler

      public LegacyRenderHandler legacyRenderHandler
      Legacy (FC) model rendering handler
    • 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
    • debug

      public String debug
      String that shows the debug information
    • fpsMetricsData

      public final MetricsData fpsMetricsData
      The MetricsData's instances
    • tpsMetricsData

      public final MetricsData tpsMetricsData
    • rPacketMetricsData

      public final MetricsData rPacketMetricsData
    • sPacketMetricsData

      public final MetricsData sPacketMetricsData
    • loadedChunks

      public short loadedChunks
      Debug infos from server
    • loadedEntities

      public int loadedEntities
    • mobCaps

      public short[] mobCaps
    • prevDebugPacketSent

      public int prevDebugPacketSent
    • debugBuffer

      public DebugDataBuffer debugBuffer
      Stores debug datas received from the server and consumes it for a set amount of time
    • debugProfilerName

      public String debugProfilerName
      Profiler currently displayed in the debug screen pie chart
  • Constructor Details

    • Minecraft

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

    • 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()
    • takePanorama

      public void takePanorama()
    • 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.
    • refreshFullscreen

      public void refreshFullscreen()
    • 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
    • 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 particles and tile entities are in render distance
    • 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.
    • getSession

      public Session getSession()
    • getProxy

      public Proxy getProxy()
    • getTextureManager

      public TextureManager getTextureManager()
    • getResourceManager

      public ResourceManager getResourceManager()
    • getResourcePackRepository

      public ResourcePackRepository getResourcePackRepository()
    • getLanguageManager

      public LanguageManager getLanguageManager()
    • getLogAgent

      public ILogAgent getLogAgent()
      Specified by:
      getLogAgent in interface IPlayerUsage
    • getTimer

      public Timer getTimer()
    • getFpsMetricsData

      public MetricsData getFpsMetricsData()
      Return the FpsMetricsData's instance
    • getTpsMetricsData

      public MetricsData getTpsMetricsData()
      Return the TpsMetricsData's instance
    • getRPacketMetricsData

      public MetricsData getRPacketMetricsData()
      Return the ReceivedPacketMetricsData's instance
    • getSPacketMetricsData

      public MetricsData getSPacketMetricsData()
      Return the ReceivedPacketMetricsData's instance
    • getIsGamePaused

      public boolean getIsGamePaused()
    • launchIntegratedServerHostile

      public void launchIntegratedServerHostile(String par1Str, String par2Str, WorldSettings par3WorldSettings)
    • setDidDifficultyCheck

      public void setDidDifficultyCheck(boolean value)
    • didDifficultyCheck

      public boolean didDifficultyCheck()