Class Gui

Direct Known Subclasses:
ForgeGui

public class Gui extends GuiComponent
  • Field Details

    • VIGNETTE_LOCATION

      protected static final ResourceLocation VIGNETTE_LOCATION
    • WIDGETS_LOCATION

      protected static final ResourceLocation WIDGETS_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
    • 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
    • itemRenderer

      protected final ItemRenderer itemRenderer
    • 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
    • debugScreen

      protected final DebugScreenOverlay debugScreen
    • 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
    • screenWidth

      protected int screenWidth
    • screenHeight

      protected int screenHeight
    • autosaveIndicatorValue

      protected float autosaveIndicatorValue
    • lastAutosaveIndicatorValue

      protected float lastAutosaveIndicatorValue
    • scopeScale

      protected float scopeScale
  • Constructor Details

  • Method Details

    • resetTitleTimes

      public void resetTitleTimes()
    • render

      public void render(PoseStack p_93031_, float p_93032_)
    • drawBackdrop

      protected void drawBackdrop(PoseStack p_93040_, Font p_93041_, int p_93042_, int p_93043_, int p_93044_)
    • renderCrosshair

      public void renderCrosshair(PoseStack p_93081_)
    • canRenderCrosshairForSpectator

      private boolean canRenderCrosshairForSpectator(HitResult p_93025_)
    • renderEffects

      public void renderEffects(PoseStack p_93029_)
    • renderHotbar

      public void renderHotbar(float p_93010_, PoseStack p_93011_)
    • renderJumpMeter

      public void renderJumpMeter(PlayerRideableJumping p_250242_, PoseStack p_250216_, int p_248942_)
    • renderExperienceBar

      public void renderExperienceBar(PoseStack p_93072_, int p_93073_)
    • renderSelectedItemName

      public void renderSelectedItemName(PoseStack p_93070_)
    • renderDemoOverlay

      public void renderDemoOverlay(PoseStack p_93078_)
    • displayScoreboardSidebar

      public void displayScoreboardSidebar(PoseStack p_93037_, Objective p_93038_)
    • getCameraPlayer

      private Player getCameraPlayer()
    • getPlayerVehicleWithHealth

      private LivingEntity getPlayerVehicleWithHealth()
    • getVehicleMaxHearts

      private int getVehicleMaxHearts(LivingEntity p_93023_)
    • getVisibleVehicleHeartRows

      private int getVisibleVehicleHeartRows(int p_93013_)
    • renderPlayerHealth

      private void renderPlayerHealth(PoseStack p_93084_)
    • renderHearts

      protected void renderHearts(PoseStack p_168689_, 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(PoseStack p_168701_, Gui.HeartType p_168702_, int p_168703_, int p_168704_, int p_168705_, boolean p_168706_, boolean p_168707_)
    • renderVehicleHealth

      private void renderVehicleHealth(PoseStack p_93087_)
    • renderTextureOverlay

      protected void renderTextureOverlay(PoseStack p_265358_, ResourceLocation p_265726_, float p_265119_)
    • renderSpyglassOverlay

      public void renderSpyglassOverlay(PoseStack p_265563_, float p_265127_)
    • updateVignetteBrightness

      private void updateVignetteBrightness(Entity p_93021_)
    • renderVignette

      public void renderVignette(PoseStack p_265650_, Entity p_265294_)
    • renderPortalOverlay

      protected void renderPortalOverlay(PoseStack p_265769_, float p_265121_)
    • renderSlot

      private void renderSlot(PoseStack p_275705_, int p_275509_, int p_275563_, float p_275329_, Player p_275633_, ItemStack p_275660_, int p_275383_)
    • 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()
    • clearCache

      public void clearCache()
    • renderSavingIndicator

      private void renderSavingIndicator(PoseStack p_193835_)