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.HoveredItemStackNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<net.minecraft.world.item.ItemStack> protected static final intprotected static final intprotected final it.unimi.dsi.fastutil.ints.Int2ObjectMap<petrolpark.mc.library.core.world.restaurant.gui.RestaurantOrderScreen.OrderModifierVisual> protected final ClientRestaurantOrder.Descriptionprotected static final intprotected static final intprotected final List<IRewardInfo> Fields inherited from class petrolpark.mc.library.core.world.restaurant.gui.RestaurantScreen
INVENTORY_Y, LINE_HEIGHT, LINE_WRITING_SPEED, lineWriting, NOTE_BOTTOM_PADDING, NOTE_END_LINES, NOTE_FIRST_LINE_Y, NOTE_LINE_OVERHANG, NOTE_TEXT_COLOR, NOTE_TEXT_WIDTH, NOTE_TEXT_X, NOTE_TEXT_Y, NOTE_X, scroll, scrollLockedFields 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, topPosFields 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, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionRestaurantOrderScreen(RestaurantOrderMenu menu, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.chat.Component title) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<net.minecraft.network.chat.Component> getLines()getNoteStackUnderMouse(net.minecraft.world.phys.Vec2 mouse) protected static intprotected static intgetRewardX(int reward) protected static intgetRewardY(int reward) protected static net.minecraft.world.item.ItemStackgetShownStack(List<net.minecraft.world.item.ItemStack> stacks) protected voidinit()protected voidrenderBg(net.minecraft.client.gui.GuiGraphics guiGraphics, float partialTick, int mouseX, int mouseY) Overriding methds must pop pose!protected voidrenderByLine(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 voidrenderTooltip(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y) protected booleanMethods inherited from class petrolpark.mc.library.core.world.restaurant.gui.RestaurantScreen
containerTick, getLineY, getMouseOnNote, getNoteBottom, getNoteTop, getNoteY, getVisibleLines, getWrittenText, isMouseOverIcon, keyPressed, mouseScrolled, render, renderLabels, renderNoteMethods 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, tickMethods 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, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods 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
-
exampleStacks
-
modifiers
protected final it.unimi.dsi.fastutil.ints.Int2ObjectMap<petrolpark.mc.library.core.world.restaurant.gui.RestaurantOrderScreen.OrderModifierVisual> modifiers -
rewards
-
-
Constructor Details
-
RestaurantOrderScreen
public RestaurantOrderScreen(RestaurantOrderMenu menu, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.chat.Component title)
-
-
Method Details
-
getLines
- Specified by:
getLinesin classRestaurantScreen<RestaurantOrderMenu>
-
shouldRenderInventory
protected boolean shouldRenderInventory()- Specified by:
shouldRenderInventoryin classRestaurantScreen<RestaurantOrderMenu>
-
init
protected void init()- Overrides:
initin classRestaurantScreen<RestaurantOrderMenu>
-
renderByLine
protected void renderByLine(net.minecraft.client.gui.GuiGraphics guiGraphics, float partialTick, int line) Description copied from class:RestaurantScreenRenders anything which belongs by a line of the note, such as in its margin. TheGuiGraphicsis 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 toNOTE_LINE_OVERHANG + 1lines high.- Overrides:
renderByLinein classRestaurantScreen<RestaurantOrderMenu>- Parameters:
line- Index of the line inRestaurantScreen.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:RestaurantScreenOverriding methds must pop pose!- Overrides:
renderBgin classRestaurantScreen<RestaurantOrderMenu>
-
renderTooltip
protected void renderTooltip(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y) - Overrides:
renderTooltipin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<RestaurantOrderMenu>
-
getNoteStackUnderMouse
public Optional<RestaurantScreen.HoveredItemStack> getNoteStackUnderMouse(net.minecraft.world.phys.Vec2 mouse) - Specified by:
getNoteStackUnderMousein classRestaurantScreen<RestaurantOrderMenu>
-