Class Gui

java.lang.Object
net.minecraft.client.gui.Gui

public class Gui extends Object
  • Field Details

    • CROSSHAIR_SPRITE

      protected static final ResourceLocation CROSSHAIR_SPRITE
    • CROSSHAIR_ATTACK_INDICATOR_FULL_SPRITE

      protected static final ResourceLocation CROSSHAIR_ATTACK_INDICATOR_FULL_SPRITE
    • CROSSHAIR_ATTACK_INDICATOR_BACKGROUND_SPRITE

      protected static final ResourceLocation CROSSHAIR_ATTACK_INDICATOR_BACKGROUND_SPRITE
    • CROSSHAIR_ATTACK_INDICATOR_PROGRESS_SPRITE

      protected static final ResourceLocation CROSSHAIR_ATTACK_INDICATOR_PROGRESS_SPRITE
    • EFFECT_BACKGROUND_AMBIENT_SPRITE

      protected static final ResourceLocation EFFECT_BACKGROUND_AMBIENT_SPRITE
    • EFFECT_BACKGROUND_SPRITE

      protected static final ResourceLocation EFFECT_BACKGROUND_SPRITE
    • HOTBAR_SPRITE

      protected static final ResourceLocation HOTBAR_SPRITE
    • HOTBAR_SELECTION_SPRITE

      protected static final ResourceLocation HOTBAR_SELECTION_SPRITE
    • HOTBAR_OFFHAND_LEFT_SPRITE

      protected static final ResourceLocation HOTBAR_OFFHAND_LEFT_SPRITE
    • HOTBAR_OFFHAND_RIGHT_SPRITE

      protected static final ResourceLocation HOTBAR_OFFHAND_RIGHT_SPRITE
    • HOTBAR_ATTACK_INDICATOR_BACKGROUND_SPRITE

      protected static final ResourceLocation HOTBAR_ATTACK_INDICATOR_BACKGROUND_SPRITE
    • HOTBAR_ATTACK_INDICATOR_PROGRESS_SPRITE

      protected static final ResourceLocation HOTBAR_ATTACK_INDICATOR_PROGRESS_SPRITE
    • JUMP_BAR_BACKGROUND_SPRITE

      protected static final ResourceLocation JUMP_BAR_BACKGROUND_SPRITE
    • JUMP_BAR_COOLDOWN_SPRITE

      protected static final ResourceLocation JUMP_BAR_COOLDOWN_SPRITE
    • JUMP_BAR_PROGRESS_SPRITE

      protected static final ResourceLocation JUMP_BAR_PROGRESS_SPRITE
    • EXPERIENCE_BAR_BACKGROUND_SPRITE

      protected static final ResourceLocation EXPERIENCE_BAR_BACKGROUND_SPRITE
    • EXPERIENCE_BAR_PROGRESS_SPRITE

      protected static final ResourceLocation EXPERIENCE_BAR_PROGRESS_SPRITE
    • ARMOR_EMPTY_SPRITE

      protected static final ResourceLocation ARMOR_EMPTY_SPRITE
    • ARMOR_HALF_SPRITE

      protected static final ResourceLocation ARMOR_HALF_SPRITE
    • ARMOR_FULL_SPRITE

      protected static final ResourceLocation ARMOR_FULL_SPRITE
    • FOOD_EMPTY_HUNGER_SPRITE

      protected static final ResourceLocation FOOD_EMPTY_HUNGER_SPRITE
    • FOOD_HALF_HUNGER_SPRITE

      protected static final ResourceLocation FOOD_HALF_HUNGER_SPRITE
    • FOOD_FULL_HUNGER_SPRITE

      protected static final ResourceLocation FOOD_FULL_HUNGER_SPRITE
    • FOOD_EMPTY_SPRITE

      protected static final ResourceLocation FOOD_EMPTY_SPRITE
    • FOOD_HALF_SPRITE

      protected static final ResourceLocation FOOD_HALF_SPRITE
    • FOOD_FULL_SPRITE

      protected static final ResourceLocation FOOD_FULL_SPRITE
    • AIR_SPRITE

      protected static final ResourceLocation AIR_SPRITE
    • AIR_BURSTING_SPRITE

      protected static final ResourceLocation AIR_BURSTING_SPRITE
    • HEART_VEHICLE_CONTAINER_SPRITE

      protected static final ResourceLocation HEART_VEHICLE_CONTAINER_SPRITE
    • HEART_VEHICLE_FULL_SPRITE

      protected static final ResourceLocation HEART_VEHICLE_FULL_SPRITE
    • HEART_VEHICLE_HALF_SPRITE

      protected static final ResourceLocation HEART_VEHICLE_HALF_SPRITE
    • VIGNETTE_LOCATION

      protected static final ResourceLocation VIGNETTE_LOCATION
    • PUMPKIN_BLUR_LOCATION

      protected static final ResourceLocation PUMPKIN_BLUR_LOCATION
    • SPYGLASS_SCOPE_LOCATION

      protected static final ResourceLocation SPYGLASS_SCOPE_LOCATION
    • POWDER_SNOW_OUTLINE_LOCATION

      protected static final ResourceLocation POWDER_SNOW_OUTLINE_LOCATION
    • SCORE_DISPLAY_ORDER

      private static final Comparator<PlayerScoreEntry> SCORE_DISPLAY_ORDER
    • DEMO_EXPIRED_TEXT

      protected static final Component DEMO_EXPIRED_TEXT
    • SAVING_TEXT

      protected static final Component SAVING_TEXT
    • COLOR_WHITE

      protected static final int COLOR_WHITE
      See Also:
    • MIN_CROSSHAIR_ATTACK_SPEED

      protected static final float MIN_CROSSHAIR_ATTACK_SPEED
      See Also:
    • NUM_HEARTS_PER_ROW

      protected static final int NUM_HEARTS_PER_ROW
      See Also:
    • LINE_HEIGHT

      protected static final int LINE_HEIGHT
      See Also:
    • SPACER

      protected static final String SPACER
      See Also:
    • PORTAL_OVERLAY_ALPHA_MIN

      protected static final float PORTAL_OVERLAY_ALPHA_MIN
      See Also:
    • HEART_SIZE

      protected static final int HEART_SIZE
      See Also:
    • HEART_SEPARATION

      protected static final int HEART_SEPARATION
      See Also:
    • AUTOSAVE_FADE_SPEED_FACTOR

      protected static final float AUTOSAVE_FADE_SPEED_FACTOR
      See Also:
    • random

      protected final RandomSource random
    • minecraft

      protected final Minecraft minecraft
    • chat

      protected final ChatComponent chat
    • tickCount

      protected int tickCount
    • overlayMessageString

      @Nullable protected Component overlayMessageString
    • overlayMessageTime

      protected int overlayMessageTime
    • animateOverlayMessageColor

      protected boolean animateOverlayMessageColor
    • chatDisabledByPlayerShown

      protected boolean chatDisabledByPlayerShown
    • vignetteBrightness

      public float vignetteBrightness
    • toolHighlightTimer

      protected int toolHighlightTimer
    • lastToolHighlight

      protected ItemStack lastToolHighlight
    • debugOverlay

      protected final DebugScreenOverlay debugOverlay
    • subtitleOverlay

      protected final SubtitleOverlay subtitleOverlay
    • spectatorGui

      protected final SpectatorGui spectatorGui
    • tabList

      protected final PlayerTabOverlay tabList
    • bossOverlay

      protected final BossHealthOverlay bossOverlay
    • titleTime

      protected int titleTime
    • title

      @Nullable protected Component title
    • subtitle

      @Nullable protected Component subtitle
    • titleFadeInTime

      protected int titleFadeInTime
    • titleStayTime

      protected int titleStayTime
    • titleFadeOutTime

      protected int titleFadeOutTime
    • lastHealth

      protected int lastHealth
    • displayHealth

      protected int displayHealth
    • lastHealthTime

      protected long lastHealthTime
    • healthBlinkTime

      protected long healthBlinkTime
    • autosaveIndicatorValue

      protected float autosaveIndicatorValue
    • lastAutosaveIndicatorValue

      protected float lastAutosaveIndicatorValue
    • layers

      @Deprecated private final LayeredDraw layers
      Deprecated.
      Neo: This is empty and unused, rendering goes through layerManager instead.
    • layerManager

      private final GuiLayerManager layerManager
    • scopeScale

      protected float scopeScale
    • leftHeight

      public int leftHeight
      Neo: This variable controls the height of overlays on the left of the hotbar (e.g. health, armor).
    • rightHeight

      public int rightHeight
      Neo: This variable controls the height of overlays on the right of the hotbar (e.g. food, vehicle health, air).
  • Constructor Details

  • Method Details

    • resetTitleTimes

      public void resetTitleTimes()
    • render

      public void render(GuiGraphics p_282884_, float p_282611_)
    • renderCameraOverlays

      private void renderCameraOverlays(GuiGraphics p_316735_, float p_316394_)
    • renderSleepOverlay

      private void renderSleepOverlay(GuiGraphics p_316466_, float p_316511_)
    • renderOverlayMessage

      private void renderOverlayMessage(GuiGraphics p_316291_, float p_316703_)
    • renderTitle

      private void renderTitle(GuiGraphics p_316629_, float p_316206_)
    • renderChat

      private void renderChat(GuiGraphics p_316307_, float p_316499_)
    • renderScoreboardSidebar

      private void renderScoreboardSidebar(GuiGraphics p_316834_, float p_316138_)
    • renderTabList

      private void renderTabList(GuiGraphics p_316182_, float p_316684_)
    • drawBackdrop

      protected void drawBackdrop(GuiGraphics p_282548_, Font p_93041_, int p_93042_, int p_93043_, int p_93044_)
    • renderCrosshair

      private void renderCrosshair(GuiGraphics p_282828_, float p_316522_)
    • canRenderCrosshairForSpectator

      private boolean canRenderCrosshairForSpectator(@Nullable HitResult p_93025_)
    • renderEffects

      private void renderEffects(GuiGraphics p_282812_, float p_316418_)
    • renderHotbarAndDecorations

      @Deprecated private void renderHotbarAndDecorations(GuiGraphics p_316628_, float p_316765_)
      Deprecated.
    • renderHotbar

      private void renderHotbar(GuiGraphics p_316628_, float p_316765_)
    • maybeRenderJumpMeter

      private void maybeRenderJumpMeter(GuiGraphics p_316628_, float p_316765_)
    • maybeRenderExperienceBar

      private void maybeRenderExperienceBar(GuiGraphics p_316628_, float p_316765_)
    • maybeRenderPlayerHealth

      private void maybeRenderPlayerHealth(GuiGraphics p_316628_, float p_316765_)
    • maybeRenderVehicleHealth

      private void maybeRenderVehicleHealth(GuiGraphics p_316628_, float p_316765_)
    • maybeRenderSelectedItemName

      private void maybeRenderSelectedItemName(GuiGraphics p_316628_, float p_316765_)
    • maybeRenderSpectatorTooltip

      private void maybeRenderSpectatorTooltip(GuiGraphics p_316628_, float p_316765_)
    • renderItemHotbar

      private void renderItemHotbar(GuiGraphics p_316896_, float p_316621_)
    • renderJumpMeter

      private void renderJumpMeter(PlayerRideableJumping p_282774_, GuiGraphics p_282939_, int p_283351_)
    • renderExperienceBar

      private void renderExperienceBar(GuiGraphics p_281906_, int p_282731_)
    • renderExperienceLevel

      private void renderExperienceLevel(GuiGraphics p_320582_, float p_320111_)
    • isExperienceBarVisible

      private boolean isExperienceBarVisible()
    • renderSelectedItemName

      private void renderSelectedItemName(GuiGraphics p_283501_)
    • renderSelectedItemName

      public void renderSelectedItemName(GuiGraphics p_283501_, int yShift)
    • renderDemoOverlay

      private void renderDemoOverlay(GuiGraphics p_281825_, float p_316211_)
    • displayScoreboardSidebar

      public void displayScoreboardSidebar(GuiGraphics p_282008_, Objective p_283455_)
    • getCameraPlayer

      @Nullable private Player getCameraPlayer()
    • getPlayerVehicleWithHealth

      @Nullable private LivingEntity getPlayerVehicleWithHealth()
    • getVehicleMaxHearts

      private int getVehicleMaxHearts(@Nullable LivingEntity p_93023_)
    • getVisibleVehicleHeartRows

      private int getVisibleVehicleHeartRows(int p_93013_)
    • renderPlayerHealth

      @Deprecated private void renderPlayerHealth(GuiGraphics p_283143_)
      Deprecated.
    • renderHealthLevel

      private void renderHealthLevel(GuiGraphics p_283143_)
    • renderArmorLevel

      private void renderArmorLevel(GuiGraphics p_283143_)
    • renderFoodLevel

      private void renderFoodLevel(GuiGraphics p_283143_)
    • renderAirLevel

      private void renderAirLevel(GuiGraphics p_283143_)
    • renderArmor

      private static void renderArmor(GuiGraphics p_335393_, Player p_335672_, int p_335452_, int p_335846_, int p_335778_, int p_335859_)
    • renderHearts

      protected void renderHearts(GuiGraphics p_282497_, Player p_168690_, int p_168691_, int p_168692_, int p_168693_, int p_168694_, float p_168695_, int p_168696_, int p_168697_, int p_168698_, boolean p_168699_)
    • renderHeart

      private void renderHeart(GuiGraphics p_283024_, Gui.HeartType p_281393_, int p_283636_, int p_283279_, boolean p_283440_, boolean p_282496_, boolean p_294129_)
    • renderFood

      private void renderFood(GuiGraphics p_335615_, Player p_336082_, int p_335399_, int p_335589_)
    • renderVehicleHealth

      private void renderVehicleHealth(GuiGraphics p_283368_)
    • renderTextureOverlay

      protected void renderTextureOverlay(GuiGraphics p_282304_, ResourceLocation p_281622_, float p_281504_)
    • renderSpyglassOverlay

      public void renderSpyglassOverlay(GuiGraphics p_282069_, float p_283442_)
    • updateVignetteBrightness

      private void updateVignetteBrightness(Entity p_93021_)
    • renderVignette

      public void renderVignette(GuiGraphics p_283063_, @Nullable Entity p_283439_)
    • renderPortalOverlay

      protected void renderPortalOverlay(GuiGraphics p_283375_, float p_283296_)
    • renderSlot

      private void renderSlot(GuiGraphics p_283283_, int p_283213_, int p_281301_, float p_281885_, Player p_283644_, ItemStack p_283317_, int p_283261_)
    • tick

      public void tick(boolean p_193833_)
    • tick

      private void tick()
    • tickAutosaveIndicator

      private void tickAutosaveIndicator()
    • setNowPlaying

      public void setNowPlaying(Component p_93056_)
    • setOverlayMessage

      public void setOverlayMessage(Component p_93064_, boolean p_93065_)
    • setChatDisabledByPlayerShown

      public void setChatDisabledByPlayerShown(boolean p_238398_)
    • isShowingChatDisabledByPlayer

      public boolean isShowingChatDisabledByPlayer()
    • setTimes

      public void setTimes(int p_168685_, int p_168686_, int p_168687_)
    • setSubtitle

      public void setSubtitle(Component p_168712_)
    • setTitle

      public void setTitle(Component p_168715_)
    • clear

      public void clear()
    • getChat

      public ChatComponent getChat()
    • getGuiTicks

      public int getGuiTicks()
    • getFont

      public Font getFont()
    • getSpectatorGui

      public SpectatorGui getSpectatorGui()
    • getTabList

      public PlayerTabOverlay getTabList()
    • onDisconnected

      public void onDisconnected()
    • getBossOverlay

      public BossHealthOverlay getBossOverlay()
    • getDebugOverlay

      public DebugScreenOverlay getDebugOverlay()
    • clearCache

      public void clearCache()
    • renderSavingIndicator

      public void renderSavingIndicator(GuiGraphics p_282761_, float p_316110_)
    • initModdedOverlays

      @Internal public void initModdedOverlays()