Package net.minecraft.client
Class MainWindow
java.lang.Object
net.minecraft.client.MainWindow
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private final org.lwjgl.glfw.GLFWErrorCallback
private boolean
private String
private final IWindowEventListener
private int
private int
private int
private boolean
private double
private int
private int
private int
private static final org.apache.logging.log4j.Logger
private final MonitorHandler
private boolean
private int
private final long
private int
private int
private int
private int
private int
private int
-
Constructor Summary
ConstructorDescriptionMainWindow
(IWindowEventListener p_i51170_1_, MonitorHandler p_i51170_2_, ScreenSize p_i51170_3_, String p_i51170_4_, String p_i51170_5_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
bootCrash
(int p_208034_0_, long p_208034_1_) int
calculateScale
(int p_216521_1_, boolean p_216521_2_) void
static void
checkGlfwError
(BiConsumer<Integer, String> p_211162_0_) void
close()
void
defaultErrorCallback
(int p_198084_1_, long p_198084_2_) int
double
int
int
int
int
int
int
int
getWidth()
long
int
getX()
int
getY()
boolean
private void
onEnter
(long p_241553_1_, boolean p_241553_3_) private void
onFocus
(long p_198095_1_, boolean p_198095_3_) private void
onFramebufferResize
(long p_198102_1_, int p_198102_3_, int p_198102_4_) private void
onMove
(long p_198080_1_, int p_198080_3_, int p_198080_4_) private void
onResize
(long p_198089_1_, int p_198089_3_, int p_198089_4_) private ByteBuffer
readIconPixels
(InputStream p_198111_1_, IntBuffer p_198111_2_, IntBuffer p_198111_3_, IntBuffer p_198111_4_) private void
private void
void
void
setErrorSection
(String p_227799_1_) void
setFramerateLimit
(int p_216526_1_) void
setGuiScale
(double p_216525_1_) void
setIcon
(InputStream p_216529_1_, InputStream p_216529_2_) private void
setMode()
void
setPreferredFullscreenVideoMode
(Optional<VideoMode> p_224797_1_) void
boolean
void
void
private void
updateFullscreen
(boolean p_216527_1_) void
updateRawMouseInput
(boolean p_224798_1_) void
updateVsync
(boolean p_216523_1_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
defaultErrorCallback
private final org.lwjgl.glfw.GLFWErrorCallback defaultErrorCallback -
eventHandler
-
screenManager
-
window
private final long window -
windowedX
private int windowedX -
windowedY
private int windowedY -
windowedWidth
private int windowedWidth -
windowedHeight
private int windowedHeight -
preferredFullscreenVideoMode
-
fullscreen
private boolean fullscreen -
actuallyFullscreen
private boolean actuallyFullscreen -
x
private int x -
y
private int y -
width
private int width -
height
private int height -
framebufferWidth
private int framebufferWidth -
framebufferHeight
private int framebufferHeight -
guiScaledWidth
private int guiScaledWidth -
guiScaledHeight
private int guiScaledHeight -
guiScale
private double guiScale -
errorSection
-
dirty
private boolean dirty -
framerateLimit
private int framerateLimit -
vsync
private boolean vsync
-
-
Constructor Details
-
MainWindow
public MainWindow(IWindowEventListener p_i51170_1_, MonitorHandler p_i51170_2_, ScreenSize p_i51170_3_, @Nullable String p_i51170_4_, String p_i51170_5_)
-
-
Method Details
-
getRefreshRate
public int getRefreshRate() -
shouldClose
public boolean shouldClose() -
checkGlfwError
-
setIcon
-
readIconPixels
@Nullable private ByteBuffer readIconPixels(InputStream p_198111_1_, IntBuffer p_198111_2_, IntBuffer p_198111_3_, IntBuffer p_198111_4_) throws IOException - Throws:
IOException
-
setErrorSection
-
setBootErrorCallback
private void setBootErrorCallback() -
bootCrash
private static void bootCrash(int p_208034_0_, long p_208034_1_) -
defaultErrorCallback
public void defaultErrorCallback(int p_198084_1_, long p_198084_2_) -
setDefaultErrorCallback
public void setDefaultErrorCallback() -
updateVsync
public void updateVsync(boolean p_216523_1_) -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
onMove
private void onMove(long p_198080_1_, int p_198080_3_, int p_198080_4_) -
onFramebufferResize
private void onFramebufferResize(long p_198102_1_, int p_198102_3_, int p_198102_4_) -
refreshFramebufferSize
private void refreshFramebufferSize() -
onResize
private void onResize(long p_198089_1_, int p_198089_3_, int p_198089_4_) -
onFocus
private void onFocus(long p_198095_1_, boolean p_198095_3_) -
onEnter
private void onEnter(long p_241553_1_, boolean p_241553_3_) -
setFramerateLimit
public void setFramerateLimit(int p_216526_1_) -
getFramerateLimit
public int getFramerateLimit() -
updateDisplay
public void updateDisplay() -
getPreferredFullscreenVideoMode
-
setPreferredFullscreenVideoMode
-
changeFullscreenVideoMode
public void changeFullscreenVideoMode() -
setMode
private void setMode() -
toggleFullScreen
public void toggleFullScreen() -
updateFullscreen
private void updateFullscreen(boolean p_216527_1_) -
calculateScale
public int calculateScale(int p_216521_1_, boolean p_216521_2_) -
setGuiScale
public void setGuiScale(double p_216525_1_) -
setTitle
-
getWindow
public long getWindow() -
isFullscreen
public boolean isFullscreen() -
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getScreenWidth
public int getScreenWidth() -
getScreenHeight
public int getScreenHeight() -
getGuiScaledWidth
public int getGuiScaledWidth() -
getGuiScaledHeight
public int getGuiScaledHeight() -
getX
public int getX() -
getY
public int getY() -
getGuiScale
public double getGuiScale() -
findBestMonitor
-
updateRawMouseInput
public void updateRawMouseInput(boolean p_224798_1_)
-