Class GuiCraftingPlan
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
org.cyclops.integratedterminals.client.gui.container.component.GuiCraftingPlan
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.GuiEventListener,net.minecraft.client.gui.components.Widget,net.minecraft.client.gui.narration.NarratableEntry,net.minecraft.client.gui.narration.NarrationSupplier
public class GuiCraftingPlan
extends net.minecraft.client.gui.components.AbstractWidget
A gui component for visualizing
CraftingOptionGuiData.
The using gui must call the following methods from its respective method:
* render(PoseStack, int, int, float)}
* drawGuiContainerBackgroundLayer(PoseStack, float, int, int)
* drawGuiContainerForegroundLayer(PoseStack, int, int)
* mouseScrolled(double, double, double)}
* mouseDragged(double, double, int, double, double)}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority -
Field Summary
FieldsFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, yFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATIONFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionGuiCraftingPlan(net.minecraft.client.gui.screens.inventory.AbstractContainerScreen parentGui, ITerminalCraftingPlan<?> craftingPlan, int guiLeft, int guiTop, int x, int y, int visibleRows) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddActiveElements(GuiCraftingPlan.Element root, List<GuiCraftingPlan.Element> elements) protected static voidaddElements(GuiCraftingPlan.Element parent, int indent, ITerminalCraftingPlan<?> craftingPlan, List<GuiCraftingPlan.Element> elements) voiddrawGuiContainerBackgroundLayer(com.mojang.blaze3d.vertex.PoseStack matrixStack, float partialTicks, int mouseX, int mouseY) voiddrawGuiContainerForegroundLayer(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY) voiddrawGuiContainerLayer(com.mojang.blaze3d.vertex.PoseStack matrixStack, int guiLeft, int guiTop, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int mouseX, int mouseY) protected intstatic StringgetDurationString(long tickDuration) static List<GuiCraftingPlan.Element>getElements(ITerminalCraftingPlan<?> craftingPlan) protected intgetTick()protected List<GuiCraftingPlan.Element>voidinheritVisualizationState(GuiCraftingPlan guiCraftingPlan) booleanisValid()booleanmouseClicked(double mouseX, double mouseY, int mouseButton) booleanmouseDragged(double mouseX, double mouseY, int mouseButton, double offsetX, double offsetY) booleanmouseScrolled(double mouseX, double mouseY, double scroll) protected voidvoidrender(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY, float partialTicks) protected static voidrenderItem(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.world.item.ItemStack itemStack, int x, int y, float scale) voidsetFirstRow(int firstRow) voidupdateNarration(net.minecraft.client.gui.narration.NarrationElementOutput p_169152_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
changeFocus, clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, getYImage, isActive, isFocused, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseReleased, narrationPriority, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, renderBg, renderButton, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth, wrapDefaultNarrationMessageMethods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, innerBlit, innerBlit, setBlitOffset, vLineMethods 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.GuiEventListener
charTyped, keyPressed, keyReleased, mouseMoved
-
Field Details
-
TICK_DELAY
protected static final int TICK_DELAY- See Also:
-
-
Constructor Details
-
GuiCraftingPlan
public GuiCraftingPlan(net.minecraft.client.gui.screens.inventory.AbstractContainerScreen parentGui, ITerminalCraftingPlan<?> craftingPlan, int guiLeft, int guiTop, int x, int y, int visibleRows)
-
-
Method Details
-
inheritVisualizationState
-
refreshList
protected void refreshList() -
addActiveElements
protected static void addActiveElements(GuiCraftingPlan.Element root, List<GuiCraftingPlan.Element> elements) -
setFirstRow
public void setFirstRow(int firstRow) -
render
public void render(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY, float partialTicks) - Specified by:
renderin interfacenet.minecraft.client.gui.components.Widget- Overrides:
renderin classnet.minecraft.client.gui.components.AbstractWidget
-
getVisibleElements
-
getAbsoluteElementIndent
-
drawGuiContainerLayer
public void drawGuiContainerLayer(com.mojang.blaze3d.vertex.PoseStack matrixStack, int guiLeft, int guiTop, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int mouseX, int mouseY) -
getTick
protected int getTick() -
renderItem
protected static void renderItem(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.world.item.ItemStack itemStack, int x, int y, float scale) -
getDurationString
-
drawGuiContainerBackgroundLayer
public void drawGuiContainerBackgroundLayer(com.mojang.blaze3d.vertex.PoseStack matrixStack, float partialTicks, int mouseX, int mouseY) -
drawGuiContainerForegroundLayer
public void drawGuiContainerForegroundLayer(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY) -
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double scroll) -
mouseDragged
public boolean mouseDragged(double mouseX, double mouseY, int mouseButton, double offsetX, double offsetY) - Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseDraggedin classnet.minecraft.client.gui.components.AbstractWidget
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) - Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseClickedin classnet.minecraft.client.gui.components.AbstractWidget
-
getElements
-
addElements
protected static void addElements(@Nullable GuiCraftingPlan.Element parent, int indent, ITerminalCraftingPlan<?> craftingPlan, List<GuiCraftingPlan.Element> elements) -
isValid
public boolean isValid() -
updateNarration
public void updateNarration(net.minecraft.client.gui.narration.NarrationElementOutput p_169152_)
-