Package net.minecraft.client.util
Class Window
java.lang.Object
net.minecraft.client.util.Window
- All Implemented Interfaces:
AutoCloseable
@Environment(CLIENT) public final class Window extends Object implements AutoCloseable
- Mappings:
Namespace Name official dleintermediary net/minecraft/class_1041named net/minecraft/client/util/Window
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWindow.GlErroredException -
Field Summary
Fields Modifier and Type Field Description private booleancurrentFullscreenprivate GLFWErrorCallbackerrorCallbackprivate WindowEventHandlereventHandlerprivate intframebufferHeightprivate intframebufferWidthprivate intframerateLimitprivate booleanfullscreenprivate longhandleprivate intheightprivate static LoggerLOGGERprivate MonitorTrackermonitorTrackerprivate Stringphaseprivate intscaledHeightprivate intscaledWidthprivate doublescaleFactorprivate Optional<VideoMode>videoModeprivate booleanvideoModeDirtyprivate booleanvsyncprivate intwidthprivate intwindowedHeightprivate intwindowedWidthprivate intwindowedXprivate intwindowedYprivate intxprivate inty -
Constructor Summary
Constructors Constructor Description Window(WindowEventHandler eventHandler, MonitorTracker monitorTracker, WindowSettings settings, String videoMode, String title) -
Method Summary
Modifier and Type Method Description static voidacceptError(BiConsumer<Integer,String> consumer)voidapplyVideoMode()intcalculateScaleFactor(int guiScale, boolean forceUnicodeFont)voidclose()intgetFramebufferHeight()intgetFramebufferWidth()intgetFramerateLimit()longgetHandle()intgetHeight()MonitorgetMonitor()intgetRefreshRate()intgetScaledHeight()intgetScaledWidth()doublegetScaleFactor()Optional<VideoMode>getVideoMode()intgetWidth()intgetX()intgetY()booleanisFullscreen()voidlogGlError(int error, long description)voidlogOnGlError()private voidonCursorEnterChanged(long window, boolean entered)private voidonFramebufferSizeChanged(long window, int width, int height)private voidonWindowFocusChanged(long window, boolean focused)private voidonWindowPosChanged(long window, int x, int y)private voidonWindowSizeChanged(long window, int width, int height)private ByteBufferreadImage(InputStream in, IntBuffer x, IntBuffer y, IntBuffer channels)voidsetFramerateLimit(int framerateLimit)voidsetIcon(InputStream icon16, InputStream icon32)voidsetPhase(String phase)voidsetRawMouseMotion(boolean rawMouseMotion)voidsetScaleFactor(double scaleFactor)voidsetTitle(String title)voidsetVideoMode(Optional<VideoMode> videoMode)voidsetVsync(boolean vsync)booleanshouldClose()voidswapBuffers()private static voidthrowGlError(int error, long description)private voidthrowOnGlError()voidtoggleFullscreen()private voidupdateFramebufferSize()private voidupdateFullscreen(boolean vsync)private voidupdateWindowRegion()
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official aLdle;a:Lorg/apache/logging/log4j/Logger;intermediary field_5178Lnet/minecraft/class_1041;field_5178:Lorg/apache/logging/log4j/Logger;named LOGGERLnet/minecraft/client/util/Window;LOGGER:Lorg/apache/logging/log4j/Logger;
-
errorCallback
- Mappings:
Namespace Name Mixin selector official bLdle;b:Lorg/lwjgl/glfw/GLFWErrorCallback;intermediary field_5190Lnet/minecraft/class_1041;field_5190:Lorg/lwjgl/glfw/GLFWErrorCallback;named errorCallbackLnet/minecraft/client/util/Window;errorCallback:Lorg/lwjgl/glfw/GLFWErrorCallback;
-
eventHandler
- Mappings:
Namespace Name Mixin selector official cLdle;c:Ldlf;intermediary field_5176Lnet/minecraft/class_1041;field_5176:Lnet/minecraft/class_3678;named eventHandlerLnet/minecraft/client/util/Window;eventHandler:Lnet/minecraft/client/WindowEventHandler;
-
monitorTracker
- Mappings:
Namespace Name Mixin selector official dLdle;d:Ldla;intermediary field_5195Lnet/minecraft/class_1041;field_5195:Lnet/minecraft/class_323;named monitorTrackerLnet/minecraft/client/util/Window;monitorTracker:Lnet/minecraft/client/util/MonitorTracker;
-
handle
private final long handle- Mappings:
Namespace Name Mixin selector official eLdle;e:Jintermediary field_5187Lnet/minecraft/class_1041;field_5187:Jnamed handleLnet/minecraft/client/util/Window;handle:J
-
windowedX
private int windowedX- Mappings:
Namespace Name Mixin selector official fLdle;f:Iintermediary field_5175Lnet/minecraft/class_1041;field_5175:Inamed windowedXLnet/minecraft/client/util/Window;windowedX:I
-
windowedY
private int windowedY- Mappings:
Namespace Name Mixin selector official gLdle;g:Iintermediary field_5185Lnet/minecraft/class_1041;field_5185:Inamed windowedYLnet/minecraft/client/util/Window;windowedY:I
-
windowedWidth
private int windowedWidth- Mappings:
Namespace Name Mixin selector official hLdle;h:Iintermediary field_5174Lnet/minecraft/class_1041;field_5174:Inamed windowedWidthLnet/minecraft/client/util/Window;windowedWidth:I
-
windowedHeight
private int windowedHeight- Mappings:
Namespace Name Mixin selector official iLdle;i:Iintermediary field_5184Lnet/minecraft/class_1041;field_5184:Inamed windowedHeightLnet/minecraft/client/util/Window;windowedHeight:I
-
videoMode
- Mappings:
Namespace Name Mixin selector official jLdle;j:Ljava/util/Optional;intermediary field_5193Lnet/minecraft/class_1041;field_5193:Ljava/util/Optional;named videoModeLnet/minecraft/client/util/Window;videoMode:Ljava/util/Optional;
-
fullscreen
private boolean fullscreen- Mappings:
Namespace Name Mixin selector official kLdle;k:Zintermediary field_5191Lnet/minecraft/class_1041;field_5191:Znamed fullscreenLnet/minecraft/client/util/Window;fullscreen:Z
-
currentFullscreen
private boolean currentFullscreen- Mappings:
Namespace Name Mixin selector official lLdle;l:Zintermediary field_5177Lnet/minecraft/class_1041;field_5177:Znamed currentFullscreenLnet/minecraft/client/util/Window;currentFullscreen:Z
-
x
private int x- Mappings:
Namespace Name Mixin selector official mLdle;m:Iintermediary field_5183Lnet/minecraft/class_1041;field_5183:Inamed xLnet/minecraft/client/util/Window;x:I
-
y
private int y- Mappings:
Namespace Name Mixin selector official nLdle;n:Iintermediary field_5198Lnet/minecraft/class_1041;field_5198:Inamed yLnet/minecraft/client/util/Window;y:I
-
width
private int width- Mappings:
Namespace Name Mixin selector official oLdle;o:Iintermediary field_5182Lnet/minecraft/class_1041;field_5182:Inamed widthLnet/minecraft/client/util/Window;width:I
-
height
private int height- Mappings:
Namespace Name Mixin selector official pLdle;p:Iintermediary field_5197Lnet/minecraft/class_1041;field_5197:Inamed heightLnet/minecraft/client/util/Window;height:I
-
framebufferWidth
private int framebufferWidth- Mappings:
Namespace Name Mixin selector official qLdle;q:Iintermediary field_5181Lnet/minecraft/class_1041;field_5181:Inamed framebufferWidthLnet/minecraft/client/util/Window;framebufferWidth:I
-
framebufferHeight
private int framebufferHeight- Mappings:
Namespace Name Mixin selector official rLdle;r:Iintermediary field_5196Lnet/minecraft/class_1041;field_5196:Inamed framebufferHeightLnet/minecraft/client/util/Window;framebufferHeight:I
-
scaledWidth
private int scaledWidth- Mappings:
Namespace Name Mixin selector official sLdle;s:Iintermediary field_5180Lnet/minecraft/class_1041;field_5180:Inamed scaledWidthLnet/minecraft/client/util/Window;scaledWidth:I
-
scaledHeight
private int scaledHeight- Mappings:
Namespace Name Mixin selector official tLdle;t:Iintermediary field_5194Lnet/minecraft/class_1041;field_5194:Inamed scaledHeightLnet/minecraft/client/util/Window;scaledHeight:I
-
scaleFactor
private double scaleFactor- Mappings:
Namespace Name Mixin selector official uLdle;u:Dintermediary field_5179Lnet/minecraft/class_1041;field_5179:Dnamed scaleFactorLnet/minecraft/client/util/Window;scaleFactor:D
-
phase
- Mappings:
Namespace Name Mixin selector official vLdle;v:Ljava/lang/String;intermediary field_5192Lnet/minecraft/class_1041;field_5192:Ljava/lang/String;named phaseLnet/minecraft/client/util/Window;phase:Ljava/lang/String;
-
videoModeDirty
private boolean videoModeDirty- Mappings:
Namespace Name Mixin selector official wLdle;w:Zintermediary field_5186Lnet/minecraft/class_1041;field_5186:Znamed videoModeDirtyLnet/minecraft/client/util/Window;videoModeDirty:Z
-
framerateLimit
private int framerateLimit- Mappings:
Namespace Name Mixin selector official xLdle;x:Iintermediary field_16238Lnet/minecraft/class_1041;field_16238:Inamed framerateLimitLnet/minecraft/client/util/Window;framerateLimit:I
-
vsync
private boolean vsync- Mappings:
Namespace Name Mixin selector official yLdle;y:Zintermediary field_16517Lnet/minecraft/class_1041;field_16517:Znamed vsyncLnet/minecraft/client/util/Window;vsync:Z
-
-
Constructor Details
-
Window
public Window(WindowEventHandler eventHandler, MonitorTracker monitorTracker, WindowSettings settings, @Nullable String videoMode, String title)- Mappings:
Namespace Name Mixin selector official <init>Ldle;<init>(Ldlf;Ldla;Ldko;Ljava/lang/String;Ljava/lang/String;)Vintermediary <init>Lnet/minecraft/class_1041;<init>(Lnet/minecraft/class_3678;Lnet/minecraft/class_323;Lnet/minecraft/class_543;Ljava/lang/String;Ljava/lang/String;)Vnamed <init>Lnet/minecraft/client/util/Window;<init>(Lnet/minecraft/client/WindowEventHandler;Lnet/minecraft/client/util/MonitorTracker;Lnet/minecraft/client/WindowSettings;Ljava/lang/String;Ljava/lang/String;)V
-
-
Method Details
-
getRefreshRate
public int getRefreshRate()- Mappings:
Namespace Name Mixin selector official aLdle;a()Iintermediary method_22092Lnet/minecraft/class_1041;method_22092()Inamed getRefreshRateLnet/minecraft/client/util/Window;getRefreshRate()I
-
shouldClose
public boolean shouldClose()- Mappings:
Namespace Name Mixin selector official bLdle;b()Zintermediary method_22093Lnet/minecraft/class_1041;method_22093()Znamed shouldCloseLnet/minecraft/client/util/Window;shouldClose()Z
-
acceptError
- Mappings:
Namespace Name Mixin selector official aLdle;a(Ljava/util/function/BiConsumer;)Vintermediary method_4492Lnet/minecraft/class_1041;method_4492(Ljava/util/function/BiConsumer;)Vnamed acceptErrorLnet/minecraft/client/util/Window;acceptError(Ljava/util/function/BiConsumer;)V
-
setIcon
- Mappings:
Namespace Name Mixin selector official aLdle;a(Ljava/io/InputStream;Ljava/io/InputStream;)Vintermediary method_4491Lnet/minecraft/class_1041;method_4491(Ljava/io/InputStream;Ljava/io/InputStream;)Vnamed setIconLnet/minecraft/client/util/Window;setIcon(Ljava/io/InputStream;Ljava/io/InputStream;)V
-
readImage
@Nullable private ByteBuffer readImage(InputStream in, IntBuffer x, IntBuffer y, IntBuffer channels) throws IOException- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdle;a(Ljava/io/InputStream;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/nio/ByteBuffer;intermediary method_4510Lnet/minecraft/class_1041;method_4510(Ljava/io/InputStream;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/nio/ByteBuffer;named readImageLnet/minecraft/client/util/Window;readImage(Ljava/io/InputStream;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/nio/ByteBuffer;
-
setPhase
- Mappings:
Namespace Name Mixin selector official aLdle;a(Ljava/lang/String;)Vintermediary method_4474Lnet/minecraft/class_1041;method_4474(Ljava/lang/String;)Vnamed setPhaseLnet/minecraft/client/util/Window;setPhase(Ljava/lang/String;)V
-
throwOnGlError
private void throwOnGlError()- Mappings:
Namespace Name Mixin selector official uLdle;u()Vintermediary method_4481Lnet/minecraft/class_1041;method_4481()Vnamed throwOnGlErrorLnet/minecraft/client/util/Window;throwOnGlError()V
-
throwGlError
private static void throwGlError(int error, long description)- Mappings:
Namespace Name Mixin selector official bLdle;b(IJ)Vintermediary method_4501Lnet/minecraft/class_1041;method_4501(IJ)Vnamed throwGlErrorLnet/minecraft/client/util/Window;throwGlError(IJ)V
-
logGlError
public void logGlError(int error, long description)- Mappings:
Namespace Name Mixin selector official aLdle;a(IJ)Vintermediary method_4482Lnet/minecraft/class_1041;method_4482(IJ)Vnamed logGlErrorLnet/minecraft/client/util/Window;logGlError(IJ)V
-
logOnGlError
public void logOnGlError()- Mappings:
Namespace Name Mixin selector official cLdle;c()Vintermediary method_4513Lnet/minecraft/class_1041;method_4513()Vnamed logOnGlErrorLnet/minecraft/client/util/Window;logOnGlError()V
-
setVsync
public void setVsync(boolean vsync)- Mappings:
Namespace Name Mixin selector official aLdle;a(Z)Vintermediary method_4497Lnet/minecraft/class_1041;method_4497(Z)Vnamed setVsyncLnet/minecraft/client/util/Window;setVsync(Z)V
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Mappings:
Namespace Name Mixin selector official closeLdle;close()Vintermediary closeLnet/minecraft/class_1041;close()Vnamed closeLnet/minecraft/client/util/Window;close()V
-
onWindowPosChanged
private void onWindowPosChanged(long window, int x, int y)- Mappings:
Namespace Name Mixin selector official aLdle;a(JII)Vintermediary method_4478Lnet/minecraft/class_1041;method_4478(JII)Vnamed onWindowPosChangedLnet/minecraft/client/util/Window;onWindowPosChanged(JII)V
-
onFramebufferSizeChanged
private void onFramebufferSizeChanged(long window, int width, int height)- Mappings:
Namespace Name Mixin selector official bLdle;b(JII)Vintermediary method_4504Lnet/minecraft/class_1041;method_4504(JII)Vnamed onFramebufferSizeChangedLnet/minecraft/client/util/Window;onFramebufferSizeChanged(JII)V
-
updateFramebufferSize
private void updateFramebufferSize()- Mappings:
Namespace Name Mixin selector official vLdle;v()Vintermediary method_4483Lnet/minecraft/class_1041;method_4483()Vnamed updateFramebufferSizeLnet/minecraft/client/util/Window;updateFramebufferSize()V
-
onWindowSizeChanged
private void onWindowSizeChanged(long window, int width, int height)- Mappings:
Namespace Name Mixin selector official cLdle;c(JII)Vintermediary method_4488Lnet/minecraft/class_1041;method_4488(JII)Vnamed onWindowSizeChangedLnet/minecraft/client/util/Window;onWindowSizeChanged(JII)V
-
onWindowFocusChanged
private void onWindowFocusChanged(long window, boolean focused)- Mappings:
Namespace Name Mixin selector official aLdle;a(JZ)Vintermediary method_4494Lnet/minecraft/class_1041;method_4494(JZ)Vnamed onWindowFocusChangedLnet/minecraft/client/util/Window;onWindowFocusChanged(JZ)V
-
onCursorEnterChanged
private void onCursorEnterChanged(long window, boolean entered)- Mappings:
Namespace Name Mixin selector official bLdle;b(JZ)Vintermediary method_30132Lnet/minecraft/class_1041;method_30132(JZ)Vnamed onCursorEnterChangedLnet/minecraft/client/util/Window;onCursorEnterChanged(JZ)V
-
setFramerateLimit
public void setFramerateLimit(int framerateLimit)- Mappings:
Namespace Name Mixin selector official aLdle;a(I)Vintermediary method_15999Lnet/minecraft/class_1041;method_15999(I)Vnamed setFramerateLimitLnet/minecraft/client/util/Window;setFramerateLimit(I)V
-
getFramerateLimit
public int getFramerateLimit()- Mappings:
Namespace Name Mixin selector official dLdle;d()Iintermediary method_16000Lnet/minecraft/class_1041;method_16000()Inamed getFramerateLimitLnet/minecraft/client/util/Window;getFramerateLimit()I
-
swapBuffers
public void swapBuffers()- Mappings:
Namespace Name Mixin selector official eLdle;e()Vintermediary method_15998Lnet/minecraft/class_1041;method_15998()Vnamed swapBuffersLnet/minecraft/client/util/Window;swapBuffers()V
-
getVideoMode
- Mappings:
Namespace Name Mixin selector official fLdle;f()Ljava/util/Optional;intermediary method_4511Lnet/minecraft/class_1041;method_4511()Ljava/util/Optional;named getVideoModeLnet/minecraft/client/util/Window;getVideoMode()Ljava/util/Optional;
-
setVideoMode
- Mappings:
Namespace Name Mixin selector official aLdle;a(Ljava/util/Optional;)Vintermediary method_4505Lnet/minecraft/class_1041;method_4505(Ljava/util/Optional;)Vnamed setVideoModeLnet/minecraft/client/util/Window;setVideoMode(Ljava/util/Optional;)V
-
applyVideoMode
public void applyVideoMode()- Mappings:
Namespace Name Mixin selector official gLdle;g()Vintermediary method_4475Lnet/minecraft/class_1041;method_4475()Vnamed applyVideoModeLnet/minecraft/client/util/Window;applyVideoMode()V
-
updateWindowRegion
private void updateWindowRegion()- Mappings:
Namespace Name Mixin selector official wLdle;w()Vintermediary method_4479Lnet/minecraft/class_1041;method_4479()Vnamed updateWindowRegionLnet/minecraft/client/util/Window;updateWindowRegion()V
-
toggleFullscreen
public void toggleFullscreen()- Mappings:
Namespace Name Mixin selector official hLdle;h()Vintermediary method_4500Lnet/minecraft/class_1041;method_4500()Vnamed toggleFullscreenLnet/minecraft/client/util/Window;toggleFullscreen()V
-
updateFullscreen
private void updateFullscreen(boolean vsync)- Mappings:
Namespace Name Mixin selector official cLdle;c(Z)Vintermediary method_4485Lnet/minecraft/class_1041;method_4485(Z)Vnamed updateFullscreenLnet/minecraft/client/util/Window;updateFullscreen(Z)V
-
calculateScaleFactor
public int calculateScaleFactor(int guiScale, boolean forceUnicodeFont)- Mappings:
Namespace Name Mixin selector official aLdle;a(IZ)Iintermediary method_4476Lnet/minecraft/class_1041;method_4476(IZ)Inamed calculateScaleFactorLnet/minecraft/client/util/Window;calculateScaleFactor(IZ)I
-
setScaleFactor
public void setScaleFactor(double scaleFactor)- Mappings:
Namespace Name Mixin selector official aLdle;a(D)Vintermediary method_15997Lnet/minecraft/class_1041;method_15997(D)Vnamed setScaleFactorLnet/minecraft/client/util/Window;setScaleFactor(D)V
-
setTitle
- Mappings:
Namespace Name Mixin selector official bLdle;b(Ljava/lang/String;)Vintermediary method_24286Lnet/minecraft/class_1041;method_24286(Ljava/lang/String;)Vnamed setTitleLnet/minecraft/client/util/Window;setTitle(Ljava/lang/String;)V
-
getHandle
public long getHandle()- Mappings:
Namespace Name Mixin selector official iLdle;i()Jintermediary method_4490Lnet/minecraft/class_1041;method_4490()Jnamed getHandleLnet/minecraft/client/util/Window;getHandle()J
-
isFullscreen
public boolean isFullscreen()- Mappings:
Namespace Name Mixin selector official jLdle;j()Zintermediary method_4498Lnet/minecraft/class_1041;method_4498()Znamed isFullscreenLnet/minecraft/client/util/Window;isFullscreen()Z
-
getFramebufferWidth
public int getFramebufferWidth()- Mappings:
Namespace Name Mixin selector official kLdle;k()Iintermediary method_4489Lnet/minecraft/class_1041;method_4489()Inamed getFramebufferWidthLnet/minecraft/client/util/Window;getFramebufferWidth()I
-
getFramebufferHeight
public int getFramebufferHeight()- Mappings:
Namespace Name Mixin selector official lLdle;l()Iintermediary method_4506Lnet/minecraft/class_1041;method_4506()Inamed getFramebufferHeightLnet/minecraft/client/util/Window;getFramebufferHeight()I
-
getWidth
public int getWidth()- Mappings:
Namespace Name Mixin selector official mLdle;m()Iintermediary method_4480Lnet/minecraft/class_1041;method_4480()Inamed getWidthLnet/minecraft/client/util/Window;getWidth()I
-
getHeight
public int getHeight()- Mappings:
Namespace Name Mixin selector official nLdle;n()Iintermediary method_4507Lnet/minecraft/class_1041;method_4507()Inamed getHeightLnet/minecraft/client/util/Window;getHeight()I
-
getScaledWidth
public int getScaledWidth()- Mappings:
Namespace Name Mixin selector official oLdle;o()Iintermediary method_4486Lnet/minecraft/class_1041;method_4486()Inamed getScaledWidthLnet/minecraft/client/util/Window;getScaledWidth()I
-
getScaledHeight
public int getScaledHeight()- Mappings:
Namespace Name Mixin selector official pLdle;p()Iintermediary method_4502Lnet/minecraft/class_1041;method_4502()Inamed getScaledHeightLnet/minecraft/client/util/Window;getScaledHeight()I
-
getX
public int getX()- Mappings:
Namespace Name Mixin selector official qLdle;q()Iintermediary method_4499Lnet/minecraft/class_1041;method_4499()Inamed getXLnet/minecraft/client/util/Window;getX()I
-
getY
public int getY()- Mappings:
Namespace Name Mixin selector official rLdle;r()Iintermediary method_4477Lnet/minecraft/class_1041;method_4477()Inamed getYLnet/minecraft/client/util/Window;getY()I
-
getScaleFactor
public double getScaleFactor()- Mappings:
Namespace Name Mixin selector official sLdle;s()Dintermediary method_4495Lnet/minecraft/class_1041;method_4495()Dnamed getScaleFactorLnet/minecraft/client/util/Window;getScaleFactor()D
-
getMonitor
- Mappings:
Namespace Name Mixin selector official tLdle;t()Ldkw;intermediary method_20831Lnet/minecraft/class_1041;method_20831()Lnet/minecraft/class_313;named getMonitorLnet/minecraft/client/util/Window;getMonitor()Lnet/minecraft/client/util/Monitor;
-
setRawMouseMotion
public void setRawMouseMotion(boolean rawMouseMotion)- Mappings:
Namespace Name Mixin selector official bLdle;b(Z)Vintermediary method_21668Lnet/minecraft/class_1041;method_21668(Z)Vnamed setRawMouseMotionLnet/minecraft/client/util/Window;setRawMouseMotion(Z)V
-