Class ContainerScreenLogicProgrammerBase<C extends ContainerLogicProgrammerBase>
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C>
org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C>
org.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C>
org.cyclops.integrateddynamics.client.gui.container.ContainerScreenLogicProgrammerBase<C>
- 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<C>, org.cyclops.cyclopscore.inventory.IValueNotifiable, ContainerLogicProgrammerBase.ScreenCallbackHandler
- Direct Known Subclasses:
ContainerScreenLogicProgrammer, ContainerScreenLogicProgrammerPortable
public class ContainerScreenLogicProgrammerBase<C extends ContainerLogicProgrammerBase>
extends org.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C>
implements ContainerLogicProgrammerBase.ScreenCallbackHandler
Base gui for the logic programmer.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected final ExpressionStartPanelprotected booleanprotected RenderPatternprotected intprotected final SubGuiHolderprotected booleanFields inherited from class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended
container, offsetX, offsetY, textureFields 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, topPosFields 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, renderables, screenExecutor, title, width -
Constructor Summary
ConstructorsConstructorDescriptionContainerScreenLogicProgrammerBase(C container, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.chat.Component title) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleancharTyped(net.minecraft.client.input.CharacterEvent evt) protected floatcolorSmoothener(float color, boolean hover) protected net.minecraft.resources.Identifiervoidprotected voiddrawBackgroundTexture(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks) Draw the background texture, and the expression side panel to the right of it, which the texture partly covers.protected voiddrawCurrentScreen(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks) static voiddrawPanel(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y, int width, int height) Draw a panel in the vanilla style.voidextractBackground(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks) protected voidextractLabels(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY) protected voidextractTooltip(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY) protected intprotected intprotected static net.minecraft.network.chat.MutableComponentprotected RectanglegetElementPosition(ContainerLogicProgrammerBase container, int i, boolean absolute) protected intprotected Rectangleprotected intprotected intprotected intprotected intprotected List<net.minecraft.network.chat.Component> getTooltipFromContainerItem(net.minecraft.world.item.ItemStack itemStack) booleanhandleElementActivation(ILogicProgrammerElement element, boolean sendToServer) protected booleanhandleKeyCode(net.minecraft.client.input.KeyEvent evt) protected booleanvoidinit()protected booleanisElementShown(ILogicProgrammerElement element) static booleanprotected booleanbooleankeyPressed(net.minecraft.client.input.KeyEvent evt) protected voidbooleanmouseClicked(net.minecraft.client.input.MouseButtonEvent evt, boolean isDoubleClick) booleanmouseDragged(net.minecraft.client.input.MouseButtonEvent evt, double dragX, double dragY) booleanmouseReleased(net.minecraft.client.input.MouseButtonEvent evt) booleanmouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) protected voidonActivateElement(ILogicProgrammerElement<RenderPattern, ContainerScreenLogicProgrammerBase<?>, ContainerLogicProgrammerBase, ?> element) voidonClose()protected voidvoidCalled when the expression node being edited in the active operator element has changed.voidCalled when another expression is edited, so typed text is thrown away.protected booleanselectPageElement(int elementId) protected voidsetSearchFieldFocussed(boolean focused) protected voidslotClicked(net.minecraft.world.inventory.Slot slot, int slotId, int mouseButton, net.minecraft.world.inventory.ContainerInput clickType) Methods inherited from class org.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling
getScrollbar, getSearchField, getSearchY, getTotalRows, isSearchEnabled, isSubsetRenderSlots, updateSearchMethods inherited from class org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended
createServerPressable, drawTooltip, extractRenderState, getGuiLeftTotal, getGuiTexture, getGuiTopTotal, getValueNotifiableType, isHovering, isHovering, isPointInRegion, onUpdate, refreshValuesMethods inherited from class net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
addItemSlotMouseAction, checkHotbarKeyPressed, extractCarriedItem, extractContents, extractSlot, extractSlots, getHoveredSlot, getImageHeight, getImageWidth, getLeftPos, getMenu, getTopPos, handleSlotStateChanged, hasClickedOutside, isInGameUi, isPauseScreen, onMouseClickAction, removed, renderSlotContents, tickMethods inherited from class net.minecraft.client.gui.screens.Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, extractBlurredBackground, extractMenuBackground, extractMenuBackground, extractMenuBackgroundTexture, extractPanorama, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fadeWidgets, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isInputCaptured, isMouseOver, isValidCharacterForName, onFilesDrop, rebuildWidgets, removeWidget, repositionElements, resize, scheduleNarration, setInitialFocus, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, nextFocusPath, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
capturesInput, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
BOX_HEIGHT
public static final int BOX_HEIGHT- See Also:
-
subGuiHolder
-
expressionStartPanel
-
operatorConfigPattern
-
operatorInfoPattern
protected ContainerScreenLogicProgrammerBase<C extends ContainerLogicProgrammerBase>.SubGuiOperatorInfo operatorInfoPattern -
firstInit
protected boolean firstInit -
relativeStep
protected int relativeStep -
swallowNextCharacter
protected boolean swallowNextCharacter
-
-
Constructor Details
-
ContainerScreenLogicProgrammerBase
public ContainerScreenLogicProgrammerBase(C container, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.network.chat.Component title)
-
-
Method Details
-
getScrollRegion
- Overrides:
getScrollRegionin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
init
public void init()- Overrides:
initin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
getExpressionTextField
- Returns:
- The typed text of the expression, kept while the panel of the active element is recreated.
-
resetExpressionText
public void resetExpressionText()Description copied from interface:ContainerLogicProgrammerBase.ScreenCallbackHandlerCalled when another expression is edited, so typed text is thrown away.- Specified by:
resetExpressionTextin interfaceContainerLogicProgrammerBase.ScreenCallbackHandler
-
containerTick
public void containerTick()- Overrides:
containerTickin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerLogicProgrammerBase>
-
onClose
public void onClose()- Overrides:
onClosein classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerLogicProgrammerBase>
-
applyPendingText
protected void applyPendingText() -
getExpressionDraftError
- Returns:
- Why the typed text of the expression can not be applied, which keeps the card from being written, or null.
-
slotClicked
protected void slotClicked(@Nullable net.minecraft.world.inventory.Slot slot, int slotId, int mouseButton, net.minecraft.world.inventory.ContainerInput clickType) - Overrides:
slotClickedin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerLogicProgrammerBase>
-
getScrollX
protected int getScrollX()- Overrides:
getScrollXin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
getScrollY
protected int getScrollY()- Overrides:
getScrollYin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
getScrollHeight
protected int getScrollHeight()- Overrides:
getScrollHeightin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
getBaseXSize
protected int getBaseXSize()- Overrides:
getBaseXSizein classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerLogicProgrammerBase>
-
isExpressionPanelOpen
public static boolean isExpressionPanelOpen()- Returns:
- If the expression side panel is shown.
-
getBaseYSize
protected int getBaseYSize()- Overrides:
getBaseYSizein classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerLogicProgrammerBase>
-
getSearchX
protected int getSearchX()- Overrides:
getSearchXin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
getSearchWidth
protected int getSearchWidth()- Overrides:
getSearchWidthin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
constructGuiTexture
protected net.minecraft.resources.Identifier constructGuiTexture()- Specified by:
constructGuiTexturein classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended<C extends ContainerLogicProgrammerBase>
-
colorSmoothener
protected float colorSmoothener(float color, boolean hover) -
extractBackground
public void extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks) - Overrides:
extractBackgroundin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
drawBackgroundTexture
protected void drawBackgroundTexture(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks) Draw the background texture, and the expression side panel to the right of it, which the texture partly covers.- Parameters:
guiGraphics- The gui graphics.
-
drawPanel
public static void drawPanel(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int x, int y, int width, int height) Draw a panel in the vanilla style. -
getElementPosition
protected Rectangle getElementPosition(ContainerLogicProgrammerBase container, int i, boolean absolute) -
drawCurrentScreen
protected void drawCurrentScreen(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTicks) - Overrides:
drawCurrentScreenin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
extractTooltip
protected void extractTooltip(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY) - Overrides:
extractTooltipin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerLogicProgrammerBase>
-
getTooltipFromContainerItem
protected List<net.minecraft.network.chat.Component> getTooltipFromContainerItem(net.minecraft.world.item.ItemStack itemStack) - Overrides:
getTooltipFromContainerItemin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerLogicProgrammerBase>
-
extractLabels
protected void extractLabels(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY) - Overrides:
extractLabelsin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerLogicProgrammerBase>
-
onActivateElement
protected void onActivateElement(ILogicProgrammerElement<RenderPattern, ContainerScreenLogicProgrammerBase<?>, ContainerLogicProgrammerBase, ?> element) -
isElementShown
- Returns:
- If the element is shown as selected: the active element, or the operator that is open in the slots of an expression.
-
onDeactivateElement
-
handleElementActivation
- Specified by:
handleElementActivationin interfaceContainerLogicProgrammerBase.ScreenCallbackHandler
-
getOperatorConfigPattern
- Specified by:
getOperatorConfigPatternin interfaceContainerLogicProgrammerBase.ScreenCallbackHandler
-
setSearchFieldFocussed
protected void setSearchFieldFocussed(boolean focused) -
isSearchFieldFocussed
protected boolean isSearchFieldFocussed() -
selectPageElement
protected boolean selectPageElement(int elementId) -
handleKeyCode
protected boolean handleKeyCode(net.minecraft.client.input.KeyEvent evt) -
charTyped
public boolean charTyped(net.minecraft.client.input.CharacterEvent evt) - Specified by:
charTypedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
charTypedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
charTypedin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
keyPressed
public boolean keyPressed(net.minecraft.client.input.KeyEvent evt) - Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
keyPressedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
keyPressedin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) - Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseScrolledin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseScrolledin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
mouseDragged
public boolean mouseDragged(net.minecraft.client.input.MouseButtonEvent evt, double dragX, double dragY) - Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseDraggedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseDraggedin classorg.cyclops.cyclopscore.client.gui.container.ContainerScreenScrolling<C extends ContainerLogicProgrammerBase>
-
mouseReleased
public boolean mouseReleased(net.minecraft.client.input.MouseButtonEvent evt) - Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseReleasedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseReleasedin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerLogicProgrammerBase>
-
mouseClicked
public boolean mouseClicked(net.minecraft.client.input.MouseButtonEvent evt, boolean isDoubleClick) - Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseClickedin classnet.minecraft.client.gui.screens.inventory.AbstractContainerScreen<C extends ContainerLogicProgrammerBase>
-
getDraftErrorMessage
protected static net.minecraft.network.chat.MutableComponent getDraftErrorMessage(ExpressionParseException error) -
label
-
hasLabeller
protected boolean hasLabeller()
-