Class AbstractAmountScreen<T extends net.minecraft.world.inventory.AbstractContainerMenu, N extends Number>

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T>
com.refinedmods.refinedstorage.common.support.AbstractBaseScreen<T>
com.refinedmods.refinedstorage.common.support.amount.AbstractAmountScreen<T,N>
All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.screens.inventory.MenuAccess<T>
Direct Known Subclasses:
AbstractSingleAmountScreen, AlternativesScreen, AutocraftingPreviewScreen, PriorityScreen, ResourceAmountScreen

public abstract class AbstractAmountScreen<T extends net.minecraft.world.inventory.AbstractContainerMenu, N extends Number> extends AbstractBaseScreen<T>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
     

    Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen

    net.minecraft.client.gui.screens.Screen.NarratableSearchResult
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected @Nullable net.minecraft.client.gui.components.EditBox
     
    protected @Nullable ActionButton
     
    protected @Nullable ActionButton
     

    Fields inherited from class AbstractBaseScreen

    TITLE_MAX_WIDTH, titleMarquee

    Fields inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen

    BACKGROUND_TEXTURE_HEIGHT, BACKGROUND_TEXTURE_WIDTH, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, hoveredSlot, imageHeight, imageWidth, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, playerInventoryTitle, quickCraftSlots, titleLabelX, titleLabelY, topPos

    Fields inherited from class net.minecraft.client.gui.screens.Screen

    FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, screenExecutor, title, width
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractAmountScreen(T containerMenu, @Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.chat.Component title, AmountScreenConfiguration<N> configuration, AmountOperations<N> amountOperations, int width, int height)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
    charTyped(net.minecraft.client.input.CharacterEvent event)
     
    final void
     
    protected abstract boolean
    confirm(N amount)
     
    protected void
    extractLabels(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY)
     
    protected final Optional<N>
     
    protected @Nullable ActionIcon
     
    protected void
     
    boolean
    keyPressed(net.minecraft.client.input.KeyEvent event)
     
    boolean
    mouseScrolled(double x, double y, double scrollX, double scrollY)
     
    protected void
     
    protected void
     
    protected final boolean
    tryClose(int key)
     
    protected final void
    updateAmount(N amount)
     

    Methods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen

    addItemSlotMouseAction, checkHotbarKeyPressed, clearDraggingState, containerTick, extractCarriedItem, extractContents, extractRenderState, extractSnapbackItem, getMenu, getTooltipFromContainerItem, handleSlotStateChanged, hasClickedOutside, isHovering, isInGameUi, isPauseScreen, mouseDragged, mouseReleased, onClose, removed, slotClicked, tick

    Methods inherited from class net.minecraft.client.gui.screens.Screen

    added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isMouseOver, isValidCharacterForName, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removeWidget, repositionElements, resize, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, preeditUpdated, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    mouseMoved, shouldTakeFocusAfterInteraction

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Field Details

    • confirmButton

      protected @Nullable ActionButton confirmButton
    • cancelButton

      protected @Nullable ActionButton cancelButton
    • amountField

      protected @Nullable net.minecraft.client.gui.components.EditBox amountField
  • Constructor Details

    • AbstractAmountScreen

      protected AbstractAmountScreen(T containerMenu, @Nullable net.minecraft.client.gui.screens.Screen parent, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.chat.Component title, AmountScreenConfiguration<N> configuration, AmountOperations<N> amountOperations, int width, int height)
  • Method Details

    • init

      protected void init()
      Overrides:
      init in class AbstractBaseScreen<T extends net.minecraft.world.inventory.AbstractContainerMenu>
    • getConfirmButtonIcon

      protected @Nullable ActionIcon getConfirmButtonIcon()
    • updateAmount

      protected final void updateAmount(N amount)
    • onAmountFieldChanged

      protected void onAmountFieldChanged()
    • confirm

      protected abstract boolean confirm(N amount)
    • mouseScrolled

      public boolean mouseScrolled(double x, double y, double scrollX, double scrollY)
      Specified by:
      mouseScrolled in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseScrolled in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseScrolled in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends net.minecraft.world.inventory.AbstractContainerMenu>
    • extractLabels

      protected void extractLabels(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY)
      Overrides:
      extractLabels in class AbstractBaseScreen<T extends net.minecraft.world.inventory.AbstractContainerMenu>
    • charTyped

      public boolean charTyped(net.minecraft.client.input.CharacterEvent event)
    • keyPressed

      public boolean keyPressed(net.minecraft.client.input.KeyEvent event)
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      keyPressed in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<T extends net.minecraft.world.inventory.AbstractContainerMenu>
    • tryClose

      protected final boolean tryClose(int key)
    • reset

      protected void reset()
    • close

      public final void close()
    • beforeClose

      protected boolean beforeClose()
    • getAndValidateAmount

      protected final Optional<N> getAndValidateAmount()