public class Minecraft extends java.lang.Object implements IThreadListener, IPlayerUsage
Modifier and Type | Field and Description |
---|---|
private BlockRendererDispatcher |
blockRenderDispatcher
The BlockRenderDispatcher instance that will be used based off gamesettings
|
private CrashReport |
crashReporter
Instance of CrashReport.
|
GuiScreen |
currentScreen
The GuiScreen that's being displayed at the moment.
|
private ServerData |
currentServerData |
java.lang.String |
debug
String that shows the debug information
|
private long |
debugCrashKeyPressTime
Keeps track of how long the debug crash keycombo (F3+C) has been pressed for, in order to crash after 10 seconds.
|
private static int |
debugFPS
This is set to fpsCounter every debug screen update, and is shown on the debug screen.
|
private java.lang.String |
debugProfilerName
Profiler currently displayed in the debug screen pie chart
|
(package private) long |
debugUpdateTime
Approximate time (in ms) of last update to debug string
|
private java.util.List<IResourcePack> |
defaultResourcePacks |
int |
displayHeight |
int |
displayWidth |
EffectRenderer |
effectRenderer |
private boolean |
enableGLErrorChecking |
EntityRenderer |
entityRenderer |
boolean |
field_175611_D |
boolean |
field_175613_B |
boolean |
field_175614_C |
private long |
field_175615_aJ |
private com.mojang.authlib.properties.PropertyMap |
field_181038_N |
private boolean |
field_181541_X |
FrameTimer |
field_181542_y |
(package private) long |
field_181543_z |
private java.io.File |
fileAssets |
private java.io.File |
fileResourcepacks |
FontRenderer |
fontRendererObj
The font renderer used for displaying and measuring text
|
(package private) int |
fpsCounter
holds the current fps
|
private Framebuffer |
framebufferMc |
private boolean |
fullscreen |
GameSettings |
gameSettings
The game settings that currently hold effect.
|
GuiAchievement |
guiAchievement
Gui achievement
|
private boolean |
hasCrashed |
GuiIngame |
ingameGUI |
boolean |
inGameHasFocus
Does the actual gameplay have focus.
|
private boolean |
integratedServerIsRunning |
private boolean |
isDemo |
private boolean |
isGamePaused |
static boolean |
isRunningOnMac |
private ItemRenderer |
itemRenderer |
private int |
joinPlayerCounter
Join player counter
|
private boolean |
jvm64bit |
private java.lang.String |
launchedVersion |
private int |
leftClickCounter
Mouse left click counter
|
LoadingScreenRenderer |
loadingScreen |
private static ResourceLocation |
locationMojangPng |
private static org.apache.logging.log4j.Logger |
logger |
private static java.util.List<org.lwjgl.opengl.DisplayMode> |
macDisplayModes |
java.io.File |
mcDataDir |
private DefaultResourcePack |
mcDefaultResourcePack |
private LanguageManager |
mcLanguageManager |
private MusicTicker |
mcMusicTicker |
Profiler |
mcProfiler
The profiler instance
|
private IReloadableResourceManager |
mcResourceManager |
private ResourcePackRepository |
mcResourcePackRepository |
private SoundHandler |
mcSoundHandler |
private java.lang.Thread |
mcThread |
static byte[] |
memoryReserve
A 10MiB preallocation to ensure the heap is reasonably sized.
|
private IMetadataSerializer |
metadataSerializer_ |
private ModelManager |
modelManager |
private ResourceLocation |
mojangLogo |
MouseHelper |
mouseHelper
Mouse helper instance.
|
private NetworkManager |
myNetworkManager |
MovingObjectPosition |
objectMouseOver
The ray trace hit that the mouse is over.
|
PlayerControllerMP |
playerController |
Entity |
pointedEntity |
(package private) long |
prevFrameTime |
private java.net.Proxy |
proxy |
boolean |
renderChunksMany |
private TextureManager |
renderEngine
The RenderEngine instance used by Minecraft
|
RenderGlobal |
renderGlobal |
private RenderItem |
renderItem |
private RenderManager |
renderManager |
private Entity |
renderViewEntity |
private int |
rightClickDelayTimer
When you place a block, it's set to 6, decremented once per tick, when it's 0, you can place another block.
|
(package private) boolean |
running
Set to true to keep the game loop running.
|
private ISaveFormat |
saveLoader |
private java.util.Queue<java.util.concurrent.FutureTask<?>> |
scheduledTasks |
private java.lang.String |
serverName |
private int |
serverPort |
private Session |
session |
private com.mojang.authlib.minecraft.MinecraftSessionService |
sessionService |
private SkinManager |
skinManager |
boolean |
skipRenderWorld
Skip render world
|
FontRenderer |
standardGalacticFontRenderer |
private IStream |
stream |
(package private) long |
systemTime |
private int |
tempDisplayHeight
Display height
|
private int |
tempDisplayWidth
Display width
|
private TextureMap |
textureMapBlocks |
private IntegratedServer |
theIntegratedServer
Instance of IntegratedServer.
|
private static Minecraft |
theMinecraft
Set to 'this' in Minecraft constructor; used by some settings get methods
|
EntityPlayerSP |
thePlayer |
WorldClient |
theWorld |
private Timer |
timer |
private com.mojang.authlib.properties.PropertyMap |
twitchDetails |
private PlayerUsageSnooper |
usageSnooper
Instance of PlayerUsageSnooper.
|
Constructor and Description |
---|
Minecraft(GameConfiguration gameConfig) |
Modifier and Type | Method and Description |
---|---|
CrashReport |
addGraphicsAndWorldToCrashReport(CrashReport theCrash)
adds core server Info (GL version , Texture pack, isModded, type), and the worldInfo to the crash report
|
<V> com.google.common.util.concurrent.ListenableFuture<V> |
addScheduledTask(java.util.concurrent.Callable<V> callableToSchedule) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Object> |
addScheduledTask(java.lang.Runnable runnableToSchedule) |
void |
addServerStatsToSnooper(PlayerUsageSnooper playerSnooper) |
void |
addServerTypeToSnooper(PlayerUsageSnooper playerSnooper) |
private void |
checkGLError(java.lang.String message)
Checks for an OpenGL error.
|
protected void |
checkWindowResize() |
private void |
clickMouse() |
void |
crashed(CrashReport crash) |
private void |
createDisplay() |
void |
dispatchKeypresses() |
void |
displayCrashReport(CrashReport crashReportIn)
Wrapper around displayCrashReportInternal
|
private void |
displayDebugInfo(long elapsedTicksTime)
Parameter appears to be unused
|
void |
displayGuiScreen(GuiScreen guiScreenIn)
Sets the argument GuiScreen as the main (topmost visible) screen.
|
void |
displayInGameMenu()
Displays the ingame menu
|
private void |
drawSplashScreen(TextureManager textureManagerInstance) |
void |
freeMemory() |
private ItemStack |
func_181036_a(Item p_181036_1_,
int p_181036_2_,
TileEntity p_181036_3_) |
com.mojang.authlib.properties.PropertyMap |
func_181037_M() |
MusicTicker |
func_181535_r() |
void |
func_181536_a(int p_181536_1_,
int p_181536_2_,
int p_181536_3_,
int p_181536_4_,
int p_181536_5_,
int p_181536_6_,
int p_181536_7_,
int p_181536_8_,
int p_181536_9_,
int p_181536_10_) |
void |
func_181537_a(boolean p_181537_1_) |
private java.lang.String |
func_181538_aA() |
FrameTimer |
func_181539_aj() |
boolean |
func_181540_al() |
MusicTicker.MusicType |
getAmbientMusicType() |
BlockRendererDispatcher |
getBlockRendererDispatcher() |
ServerData |
getCurrentServerData() |
static int |
getDebugFPS() |
Framebuffer |
getFramebuffer() |
static int |
getGLMaximumTextureSize()
Used in the usage snooper.
|
IntegratedServer |
getIntegratedServer()
Returns the currently running integrated server
|
ItemRenderer |
getItemRenderer() |
LanguageManager |
getLanguageManager() |
int |
getLimitFramerate() |
static Minecraft |
getMinecraft()
Return the singleton Minecraft instance for the game
|
NetHandlerPlayClient |
getNetHandler() |
PlayerUsageSnooper |
getPlayerUsageSnooper()
Returns the PlayerUsageSnooper instance.
|
java.net.Proxy |
getProxy() |
RenderItem |
getRenderItem() |
RenderManager |
getRenderManager() |
Entity |
getRenderViewEntity() |
IResourceManager |
getResourceManager() |
ResourcePackRepository |
getResourcePackRepository() |
ISaveFormat |
getSaveLoader()
Returns the save loader that is currently being used
|
Session |
getSession() |
static java.util.Map<java.lang.String,java.lang.String> |
getSessionInfo() |
com.mojang.authlib.minecraft.MinecraftSessionService |
getSessionService() |
SkinManager |
getSkinManager() |
SoundHandler |
getSoundHandler() |
static long |
getSystemTime()
Gets the system time in milliseconds.
|
TextureManager |
getTextureManager() |
TextureMap |
getTextureMapBlocks() |
com.mojang.authlib.properties.PropertyMap |
getTwitchDetails() |
IStream |
getTwitchStream() |
java.lang.String |
getVersion() |
private void |
initStream() |
static boolean |
isAmbientOcclusionEnabled()
Returns if ambient occlusion is enabled
|
boolean |
isCallingFromMinecraftThread() |
boolean |
isDemo()
Gets whether this is a demo or not.
|
static boolean |
isFancyGraphicsEnabled() |
boolean |
isFramerateLimitBelowMax() |
boolean |
isFullScreen()
Returns whether we're in full screen or not.
|
boolean |
isGamePaused() |
static boolean |
isGuiEnabled() |
boolean |
isIntegratedServerRunning() |
boolean |
isJava64bit() |
private static boolean |
isJvm64bit() |
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.
|
boolean |
isUnicode() |
void |
launchIntegratedServer(java.lang.String folderName,
java.lang.String worldName,
WorldSettings worldSettingsIn)
Arguments: World foldername, World ingame name, WorldSettings
|
void |
loadWorld(WorldClient worldClientIn)
unloads the current world first
|
void |
loadWorld(WorldClient worldClientIn,
java.lang.String loadingMessage)
par2Str is displayed on the loading screen to the user unloads the current world first
|
private void |
middleClickMouse()
Called when user clicked he's mouse middle button (pick block)
|
private java.nio.ByteBuffer |
readImageToBuffer(java.io.InputStream imageStream) |
void |
refreshResources() |
private void |
registerMetadataSerializers() |
private void |
resize(int width,
int height)
Called to resize the current screen.
|
private void |
rightClickMouse() |
void |
run() |
private void |
runGameLoop()
Called repeatedly from run()
|
void |
runTick()
Runs the current tick.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Object> |
scheduleResourcesRefresh() |
private void |
sendClickBlockToController(boolean leftClick) |
void |
setDimensionAndSpawnPlayer(int dimension) |
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.
|
private void |
setInitialDisplayMode() |
void |
setRenderViewEntity(Entity viewingEntity) |
void |
setServerData(ServerData serverDataIn)
Set the current ServerData instance.
|
private void |
setWindowIcon() |
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.
|
private void |
startGame()
Starts the game: initializes the canvas, the title, the settings, etcetera.
|
private void |
startTimerHackThread() |
static void |
stopIntegratedServer() |
void |
toggleFullscreen()
Toggles fullscreen mode.
|
private void |
updateDebugProfilerName(int keyCount)
Update debugProfilerName in response to number keys in debug screen
|
void |
updateDisplay() |
private void |
updateDisplayMode() |
private void |
updateFramebufferSize() |
private static final org.apache.logging.log4j.Logger logger
private static final ResourceLocation locationMojangPng
public static final boolean isRunningOnMac
public static byte[] memoryReserve
private static final java.util.List<org.lwjgl.opengl.DisplayMode> macDisplayModes
private final java.io.File fileResourcepacks
private final com.mojang.authlib.properties.PropertyMap twitchDetails
private final com.mojang.authlib.properties.PropertyMap field_181038_N
private ServerData currentServerData
private TextureManager renderEngine
private static Minecraft theMinecraft
public PlayerControllerMP playerController
private boolean fullscreen
private boolean enableGLErrorChecking
private boolean hasCrashed
private CrashReport crashReporter
public int displayWidth
public int displayHeight
private boolean field_181541_X
private Timer timer
private PlayerUsageSnooper usageSnooper
public WorldClient theWorld
public RenderGlobal renderGlobal
private RenderManager renderManager
private RenderItem renderItem
private ItemRenderer itemRenderer
public EntityPlayerSP thePlayer
private Entity renderViewEntity
public Entity pointedEntity
public EffectRenderer effectRenderer
private final Session session
private boolean isGamePaused
public FontRenderer fontRendererObj
public FontRenderer standardGalacticFontRenderer
public GuiScreen currentScreen
public LoadingScreenRenderer loadingScreen
public EntityRenderer entityRenderer
private int leftClickCounter
private int tempDisplayWidth
private int tempDisplayHeight
private IntegratedServer theIntegratedServer
public GuiAchievement guiAchievement
public GuiIngame ingameGUI
public boolean skipRenderWorld
public MovingObjectPosition objectMouseOver
public GameSettings gameSettings
public MouseHelper mouseHelper
public final java.io.File mcDataDir
private final java.io.File fileAssets
private final java.lang.String launchedVersion
private final java.net.Proxy proxy
private ISaveFormat saveLoader
private static int debugFPS
private int rightClickDelayTimer
private java.lang.String serverName
private int serverPort
public boolean inGameHasFocus
long systemTime
private int joinPlayerCounter
public final FrameTimer field_181542_y
long field_181543_z
private final boolean jvm64bit
private final boolean isDemo
private NetworkManager myNetworkManager
private boolean integratedServerIsRunning
public final Profiler mcProfiler
private long debugCrashKeyPressTime
private IReloadableResourceManager mcResourceManager
private final IMetadataSerializer metadataSerializer_
private final java.util.List<IResourcePack> defaultResourcePacks
private final DefaultResourcePack mcDefaultResourcePack
private ResourcePackRepository mcResourcePackRepository
private LanguageManager mcLanguageManager
private IStream stream
private Framebuffer framebufferMc
private TextureMap textureMapBlocks
private SoundHandler mcSoundHandler
private MusicTicker mcMusicTicker
private ResourceLocation mojangLogo
private final com.mojang.authlib.minecraft.MinecraftSessionService sessionService
private SkinManager skinManager
private final java.util.Queue<java.util.concurrent.FutureTask<?>> scheduledTasks
private long field_175615_aJ
private final java.lang.Thread mcThread
private ModelManager modelManager
private BlockRendererDispatcher blockRenderDispatcher
volatile boolean running
public java.lang.String debug
public boolean field_175613_B
public boolean field_175614_C
public boolean field_175611_D
public boolean renderChunksMany
long debugUpdateTime
int fpsCounter
long prevFrameTime
private java.lang.String debugProfilerName
public Minecraft(GameConfiguration gameConfig)
public void run()
private void startGame() throws org.lwjgl.LWJGLException, java.io.IOException
org.lwjgl.LWJGLException
java.io.IOException
private void registerMetadataSerializers()
private void initStream()
private void createDisplay() throws org.lwjgl.LWJGLException
org.lwjgl.LWJGLException
private void setInitialDisplayMode() throws org.lwjgl.LWJGLException
org.lwjgl.LWJGLException
private void setWindowIcon()
private static boolean isJvm64bit()
public Framebuffer getFramebuffer()
public java.lang.String getVersion()
private void startTimerHackThread()
public void crashed(CrashReport crash)
public void displayCrashReport(CrashReport crashReportIn)
public boolean isUnicode()
public void refreshResources()
private java.nio.ByteBuffer readImageToBuffer(java.io.InputStream imageStream) throws java.io.IOException
java.io.IOException
private void updateDisplayMode() throws org.lwjgl.LWJGLException
org.lwjgl.LWJGLException
private void drawSplashScreen(TextureManager textureManagerInstance) throws org.lwjgl.LWJGLException
org.lwjgl.LWJGLException
public void func_181536_a(int p_181536_1_, int p_181536_2_, int p_181536_3_, int p_181536_4_, int p_181536_5_, int p_181536_6_, int p_181536_7_, int p_181536_8_, int p_181536_9_, int p_181536_10_)
public ISaveFormat getSaveLoader()
public void displayGuiScreen(GuiScreen guiScreenIn)
private void checkGLError(java.lang.String message)
public void shutdownMinecraftApplet()
private void runGameLoop() throws java.io.IOException
java.io.IOException
public void updateDisplay()
protected void checkWindowResize()
public int getLimitFramerate()
public boolean isFramerateLimitBelowMax()
public void freeMemory()
private void updateDebugProfilerName(int keyCount)
private void displayDebugInfo(long elapsedTicksTime)
public void shutdown()
public void setIngameFocus()
public void setIngameNotInFocus()
public void displayInGameMenu()
private void sendClickBlockToController(boolean leftClick)
private void clickMouse()
private void rightClickMouse()
public void toggleFullscreen()
private void resize(int width, int height)
private void updateFramebufferSize()
public MusicTicker func_181535_r()
public void runTick() throws java.io.IOException
java.io.IOException
public void launchIntegratedServer(java.lang.String folderName, java.lang.String worldName, WorldSettings worldSettingsIn)
public void loadWorld(WorldClient worldClientIn)
public void loadWorld(WorldClient worldClientIn, java.lang.String loadingMessage)
public void setDimensionAndSpawnPlayer(int dimension)
public final boolean isDemo()
public NetHandlerPlayClient getNetHandler()
public static boolean isGuiEnabled()
public static boolean isFancyGraphicsEnabled()
public static boolean isAmbientOcclusionEnabled()
private void middleClickMouse()
private ItemStack func_181036_a(Item p_181036_1_, int p_181036_2_, TileEntity p_181036_3_)
public CrashReport addGraphicsAndWorldToCrashReport(CrashReport theCrash)
public static Minecraft getMinecraft()
public com.google.common.util.concurrent.ListenableFuture<java.lang.Object> scheduleResourcesRefresh()
public void addServerStatsToSnooper(PlayerUsageSnooper playerSnooper)
addServerStatsToSnooper
in interface IPlayerUsage
private java.lang.String func_181538_aA()
public void addServerTypeToSnooper(PlayerUsageSnooper playerSnooper)
addServerTypeToSnooper
in interface IPlayerUsage
public static int getGLMaximumTextureSize()
public boolean isSnooperEnabled()
isSnooperEnabled
in interface IPlayerUsage
public void setServerData(ServerData serverDataIn)
public ServerData getCurrentServerData()
public boolean isIntegratedServerRunning()
public boolean isSingleplayer()
public IntegratedServer getIntegratedServer()
public static void stopIntegratedServer()
public PlayerUsageSnooper getPlayerUsageSnooper()
public static long getSystemTime()
public boolean isFullScreen()
public Session getSession()
public com.mojang.authlib.properties.PropertyMap getTwitchDetails()
public com.mojang.authlib.properties.PropertyMap func_181037_M()
public java.net.Proxy getProxy()
public TextureManager getTextureManager()
public IResourceManager getResourceManager()
public ResourcePackRepository getResourcePackRepository()
public LanguageManager getLanguageManager()
public TextureMap getTextureMapBlocks()
public boolean isJava64bit()
public boolean isGamePaused()
public SoundHandler getSoundHandler()
public MusicTicker.MusicType getAmbientMusicType()
public IStream getTwitchStream()
public void dispatchKeypresses()
public com.mojang.authlib.minecraft.MinecraftSessionService getSessionService()
public SkinManager getSkinManager()
public Entity getRenderViewEntity()
public void setRenderViewEntity(Entity viewingEntity)
public <V> com.google.common.util.concurrent.ListenableFuture<V> addScheduledTask(java.util.concurrent.Callable<V> callableToSchedule)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Object> addScheduledTask(java.lang.Runnable runnableToSchedule)
addScheduledTask
in interface IThreadListener
public boolean isCallingFromMinecraftThread()
isCallingFromMinecraftThread
in interface IThreadListener
public BlockRendererDispatcher getBlockRendererDispatcher()
public RenderManager getRenderManager()
public RenderItem getRenderItem()
public ItemRenderer getItemRenderer()
public static int getDebugFPS()
public FrameTimer func_181539_aj()
public static java.util.Map<java.lang.String,java.lang.String> getSessionInfo()
public boolean func_181540_al()
public void func_181537_a(boolean p_181537_1_)