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 dmwintermediary 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, @Nullable 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()@Nullable 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 @Nullable 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 aLdmw;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 bLdmw;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 cLdmw;c:Ldmx;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 dLdmw;d:Ldms;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 eLdmw;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 fLdmw;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 gLdmw;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 hLdmw;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 iLdmw;i:Iintermediary field_5184Lnet/minecraft/class_1041;field_5184:Inamed windowedHeightLnet/minecraft/client/util/Window;windowedHeight:I
-
videoMode
- Mappings:
Namespace Name Mixin selector official jLdmw;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 kLdmw;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 lLdmw;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 mLdmw;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 nLdmw;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 oLdmw;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 pLdmw;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 qLdmw;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 rLdmw;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 sLdmw;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 tLdmw;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 uLdmw;u:Dintermediary field_5179Lnet/minecraft/class_1041;field_5179:Dnamed scaleFactorLnet/minecraft/client/util/Window;scaleFactor:D
-
phase
- Mappings:
Namespace Name Mixin selector official vLdmw;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 wLdmw;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 xLdmw;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 yLdmw;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 @Nullable String videoMode, String title)- Mappings:
Namespace Name Mixin selector official <init>Ldmw;<init>(Ldmx;Ldms;Ldmh;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 aLdmw;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 bLdmw;b()Zintermediary method_22093Lnet/minecraft/class_1041;method_22093()Znamed shouldCloseLnet/minecraft/client/util/Window;shouldClose()Z
-
acceptError
- Mappings:
Namespace Name Mixin selector official aLdmw;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 aLdmw;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 @Nullable ByteBuffer readImage(InputStream in, IntBuffer x, IntBuffer y, IntBuffer channels) throws IOException- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdmw;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 aLdmw;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 uLdmw;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 bLdmw;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 aLdmw;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 cLdmw;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 aLdmw;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 closeLdmw;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 aLdmw;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 bLdmw;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 vLdmw;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 cLdmw;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 aLdmw;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 bLdmw;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 aLdmw;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 dLdmw;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 eLdmw;e()Vintermediary method_15998Lnet/minecraft/class_1041;method_15998()Vnamed swapBuffersLnet/minecraft/client/util/Window;swapBuffers()V
-
getVideoMode
- Mappings:
Namespace Name Mixin selector official fLdmw;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 aLdmw;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 gLdmw;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 wLdmw;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 hLdmw;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 cLdmw;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 aLdmw;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 aLdmw;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 bLdmw;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 iLdmw;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 jLdmw;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 kLdmw;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 lLdmw;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 mLdmw;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 nLdmw;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 oLdmw;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 pLdmw;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 qLdmw;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 rLdmw;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 sLdmw;s()Dintermediary method_4495Lnet/minecraft/class_1041;method_4495()Dnamed getScaleFactorLnet/minecraft/client/util/Window;getScaleFactor()D
-
getMonitor
- Mappings:
Namespace Name Mixin selector official tLdmw;t()Ldmo;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 bLdmw;b(Z)Vintermediary method_21668Lnet/minecraft/class_1041;method_21668(Z)Vnamed setRawMouseMotionLnet/minecraft/client/util/Window;setRawMouseMotion(Z)V
-