Class RestaurantOrderScreen

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<RestaurantOrderMenu>
petrolpark.mc.library.core.world.restaurant.gui.RestaurantScreen<RestaurantOrderMenu>
petrolpark.mc.library.core.world.restaurant.gui.RestaurantOrderScreen
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<RestaurantOrderMenu>

@ParametersAreNonnullByDefault public class RestaurantOrderScreen extends RestaurantScreen<RestaurantOrderMenu>
  • Nested Class Summary

    Nested classes/interfaces inherited from class petrolpark.mc.library.core.world.restaurant.gui.RestaurantScreen

    RestaurantScreen.HoveredItemStack

    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 final List<net.minecraft.world.item.ItemStack>
     
    protected static final int
     
    protected static final int
     
    protected final it.unimi.dsi.fastutil.ints.Int2ObjectMap<petrolpark.mc.library.core.world.restaurant.gui.RestaurantOrderScreen.OrderModifierVisual>
     
     
    protected static final int
     
    protected static final int
     
    protected final List<IRewardInfo>
     

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

    hoveredSlot, imageHeight, imageWidth, INVENTORY_LOCATION, inventoryLabelX, inventoryLabelY, isQuickCrafting, leftPos, menu, playerInventoryTitle, quickCraftSlots, SLOT_ITEM_BLIT_OFFSET, slotColor, titleLabelX, titleLabelY, topPos

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

    CUBE_MAP, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, PANORAMA, renderables, screenExecutor, title, width

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

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    RestaurantOrderScreen(RestaurantOrderMenu menu, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.chat.Component title)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<net.minecraft.network.chat.Component>
     
    getNoteStackUnderMouse(net.minecraft.world.phys.Vec2 mouse)
     
    protected static int
     
    protected static int
    getRewardX(int reward)
     
    protected static int
    getRewardY(int reward)
     
    protected static net.minecraft.world.item.ItemStack
    getShownStack(List<net.minecraft.world.item.ItemStack> stacks)
     
    protected void
     
    protected void
    renderBg(net.minecraft.client.gui.GuiGraphics guiGraphics, float partialTick, int mouseX, int mouseY)
    Overriding methds must pop pose!
    protected void
    renderByLine(net.minecraft.client.gui.GuiGraphics guiGraphics, float partialTick, int line)
    Renders anything which belongs by a line of the note, such as in its margin.
    protected void
    renderTooltip(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
     
    protected boolean
     

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

    checkHotbarKeyPressed, clearDraggingState, findSlot, getGuiLeft, getGuiTop, getMenu, getSlotColor, getSlotUnderMouse, getTooltipFromContainerItem, getXSize, getYSize, handleSlotStateChanged, hasClickedOutside, isHovering, isPauseScreen, mouseClicked, mouseDragged, mouseReleased, onClose, removed, renderBackground, renderSlot, renderSlotContents, renderSlotHighlight, renderSlotHighlight, renderSlotHighlight, slotClicked, tick

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

    added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, changeFocus, children, clearFocus, clearTooltipForNextRenderPass, clearWidgets, findNarratableWidget, getBackgroundMusic, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleComponentClicked, handleDelayedNarration, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltip, repositionElements, resize, setInitialFocus, setInitialFocus, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, setTooltipForNextRenderPass, shouldCloseOnEsc, shouldNarrateNavigation, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatus, wrapScreenError

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

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class java.lang.Object

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

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

    charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, setFocused

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

    mouseMoved

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

    getTabOrderGroup
  • Field Details

    • ORDER_LINE

      protected static final int ORDER_LINE
      See Also:
    • ICON_X

      protected static final int ICON_X
      See Also:
    • ICON_Y

      protected static final int ICON_Y
      See Also:
    • REWARD_SIZE

      protected static final int REWARD_SIZE
      See Also:
    • order

      protected final ClientRestaurantOrder.Description order
    • exampleStacks

      protected final List<net.minecraft.world.item.ItemStack> exampleStacks
    • modifiers

      protected final it.unimi.dsi.fastutil.ints.Int2ObjectMap<petrolpark.mc.library.core.world.restaurant.gui.RestaurantOrderScreen.OrderModifierVisual> modifiers
    • rewards

      protected final List<IRewardInfo> rewards
  • Constructor Details

    • RestaurantOrderScreen

      public RestaurantOrderScreen(RestaurantOrderMenu menu, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.chat.Component title)
  • Method Details

    • getLines

      protected List<net.minecraft.network.chat.Component> getLines()
      Specified by:
      getLines in class RestaurantScreen<RestaurantOrderMenu>
    • shouldRenderInventory

      protected boolean shouldRenderInventory()
      Specified by:
      shouldRenderInventory in class RestaurantScreen<RestaurantOrderMenu>
    • init

      protected void init()
      Overrides:
      init in class RestaurantScreen<RestaurantOrderMenu>
    • renderByLine

      protected void renderByLine(net.minecraft.client.gui.GuiGraphics guiGraphics, float partialTick, int line)
      Description copied from class: RestaurantScreen
      Renders anything which belongs by a line of the note, such as in its margin. The GuiGraphics is translated to the top left corner of the line, and everything rendered is cut off with the rest of the note, so it scrolls with it and hides behind the inventory. Anything rendered may be up to NOTE_LINE_OVERHANG + 1 lines high.
      Overrides:
      renderByLine in class RestaurantScreen<RestaurantOrderMenu>
      Parameters:
      line - Index of the line in RestaurantScreen.getLines(), which has at least started being written
    • getRewardsPerRow

      protected static int getRewardsPerRow()
    • getRewardX

      protected static int getRewardX(int reward)
    • getRewardY

      protected static int getRewardY(int reward)
    • getShownStack

      protected static net.minecraft.world.item.ItemStack getShownStack(List<net.minecraft.world.item.ItemStack> stacks)
    • renderBg

      protected void renderBg(net.minecraft.client.gui.GuiGraphics guiGraphics, float partialTick, int mouseX, int mouseY)
      Description copied from class: RestaurantScreen
      Overriding methds must pop pose!
      Overrides:
      renderBg in class RestaurantScreen<RestaurantOrderMenu>
    • renderTooltip

      protected void renderTooltip(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y)
      Overrides:
      renderTooltip in class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<RestaurantOrderMenu>
    • getNoteStackUnderMouse

      public Optional<RestaurantScreen.HoveredItemStack> getNoteStackUnderMouse(net.minecraft.world.phys.Vec2 mouse)
      Specified by:
      getNoteStackUnderMouse in class RestaurantScreen<RestaurantOrderMenu>