public final class UIState
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
active
Whether the UI is active or not.
|
net.minecraft.world.phys.AABB |
blockBounds
The area of blocks displayed in the UI.
|
double |
blockSize
The width in pixels of a single block in the UI's map at the current zoom level.
|
java.lang.Integer |
chunkY
For underground/cave/nether/end maps, the vertical slice (chunk y) displayed.
|
net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> |
dimension
The dimension displayed in the UI.
|
java.awt.geom.Rectangle2D.Double |
displayBounds
The screen area (pixels) used by the UI.
|
static int |
FULLSCREEN_ZOOM_MIN
Max Zoom Out for fullscreen 2 pixels per region.
|
net.minecraft.core.BlockPos |
mapCenter
The block position at the center of the UI.
|
Context.MapType |
mapType
The current map type of the UI.
|
static int |
MINIMAP_ZOOM_MIN
Maz Zoom out for the minimap.
|
Context.UI |
ui
The UI to which this state applies.
|
int |
zoom
The current zoom level of the UI.
|
static int |
ZOOM_IN_MAX
Max Zoom In value.
|
| Constructor and Description |
|---|
UIState(Context.UI ui,
boolean active,
net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension,
int zoom,
Context.MapType mapType,
net.minecraft.core.BlockPos mapCenter,
java.lang.Integer chunkY,
net.minecraft.world.phys.AABB blockBounds,
java.awt.geom.Rectangle2D.Double displayBounds)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
static UIState |
newInactive(Context.UI ui,
net.minecraft.client.Minecraft minecraft)
Convenience factory method to create an inactive UIState.
|
static UIState |
newInactive(UIState priorState)
Convenience factory method to create an inactive UIState.
|
java.lang.String |
toString() |
public static final int ZOOM_IN_MAX
public static final int FULLSCREEN_ZOOM_MIN
public static final int MINIMAP_ZOOM_MIN
public final Context.UI ui
public final boolean active
public final net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension
public final int zoom
public final Context.MapType mapType
public final net.minecraft.core.BlockPos mapCenter
public final java.lang.Integer chunkY
public final net.minecraft.world.phys.AABB blockBounds
public final java.awt.geom.Rectangle2D.Double displayBounds
public final double blockSize
public UIState(Context.UI ui, boolean active, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, int zoom, @Nullable Context.MapType mapType, @Nullable net.minecraft.core.BlockPos mapCenter, @Nullable java.lang.Integer chunkY, @Nullable net.minecraft.world.phys.AABB blockBounds, @Nullable java.awt.geom.Rectangle2D.Double displayBounds)
ui - The UI which has been updated.active - Whether the UI is activedimension - The current dimension shown in the UI.zoom - The current zoom level of the UI.mapType - The current map type of the UI.mapCenter - The block position at the center of the UI.blockBounds - The area of blocks displayed in the UI.public static UIState newInactive(Context.UI ui, net.minecraft.client.Minecraft minecraft)
ui - the uipublic static UIState newInactive(UIState priorState)
priorState - the prior UIStatepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object