Class ValueTypeOperatorLPElement
java.lang.Object
org.cyclops.integrateddynamics.core.logicprogrammer.ValueTypeLPElementBase
org.cyclops.integrateddynamics.core.logicprogrammer.ValueTypeOperatorLPElement
- All Implemented Interfaces:
IGuiInputElement<ISubGuiBox,,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> ILogicProgrammerElement<ISubGuiBox,,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> IValueTypeLogicProgrammerElement<ISubGuiBox,,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> IDropdownEntryListener
public class ValueTypeOperatorLPElement
extends ValueTypeLPElementBase
implements IDropdownEntryListener
Element for the operator value type.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classValueTypeOperatorLPElement.RenderPatternOperator<S extends ISubGuiBox,G extends net.minecraft.client.gui.screens.inventory.AbstractContainerScreen, C extends net.minecraft.world.inventory.AbstractContainerMenu> Nested classes/interfaces inherited from class org.cyclops.integrateddynamics.core.logicprogrammer.ValueTypeLPElementBase
ValueTypeLPElementBase.ValueTypeVariableFacadeFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Called when this element is activated.booleancreateSubGui(int baseX, int baseY, int maxWidth, int maxHeight, ContainerScreenLogicProgrammerBase gui, ContainerLogicProgrammerBase container) GuiElementValueTypeDropdownList<IOperator,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> getType()getValue()voidonSetDropdownPossiblity(IDropdownEntry dropdownEntry) Will be called when a dropdown entry is selected or completely matches.voidvoidsetValueInGui(ISubGuiBox subGui) Set the currently stored value in the given sub gui.net.minecraft.network.chat.Componentvalidate()Validates the current state of the element.Methods inherited from class org.cyclops.integrateddynamics.core.logicprogrammer.ValueTypeLPElementBase
canCurrentlyReadFromOtherItem, createInnerGuiElement, deactivate, getColor, getItemStackSizeLimit, getMatchString, getName, getSymbol, isFocused, isFor, isItemValidForSlot, loadElement, loadTooltip, matchesInput, matchesOutput, onInputSlotUpdated, setFocused, setValueInContainer, slotClick, writeElementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.logicprogrammer.ILogicProgrammerElement
createSlotMethods inherited from interface org.cyclops.integrateddynamics.api.logicprogrammer.IValueTypeLogicProgrammerElement
getValueType
-
Constructor Details
-
ValueTypeOperatorLPElement
public ValueTypeOperatorLPElement()
-
-
Method Details
-
getInnerGuiElement
public GuiElementValueTypeDropdownList<IOperator,ContainerScreenLogicProgrammerBase, getInnerGuiElement()ContainerLogicProgrammerBase> - Overrides:
getInnerGuiElementin classValueTypeLPElementBase
-
getType
- Specified by:
getTypein interfaceILogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
getTypein classValueTypeLPElementBase- Returns:
- The element type.
-
validate
public net.minecraft.network.chat.Component validate()Description copied from interface:IGuiInputElementValidates the current state of the element.- Specified by:
validatein interfaceIGuiInputElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Returns:
- An error or null.
-
getRenderPattern
- Specified by:
getRenderPatternin interfaceIGuiInputElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
getRenderPatternin classValueTypeLPElementBase- Returns:
- The render pattern.
-
canWriteElementPre
public boolean canWriteElementPre()- Specified by:
canWriteElementPrein interfaceILogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
canWriteElementPrein classValueTypeLPElementBase- Returns:
- If this element can be written to an item in its current state.
-
getValue
- Specified by:
getValuein interfaceIValueTypeLogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Returns:
- The current value.
-
setValue
- Specified by:
setValuein interfaceIValueTypeLogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
setValuein classValueTypeLPElementBase- Parameters:
value- The new value.
-
setValueInGui
Description copied from interface:ILogicProgrammerElementSet the currently stored value in the given sub gui. This is useful when the gui is reused for multiple elements where the actual value is stored in this element.- Specified by:
setValueInGuiin interfaceILogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
setValueInGuiin classValueTypeLPElementBase- Parameters:
subGui- The sub gui to put the currently stored value in.
-
activate
public void activate()Description copied from interface:IGuiInputElementCalled when this element is activated.- Specified by:
activatein interfaceIGuiInputElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
activatein classValueTypeLPElementBase
-
onSetDropdownPossiblity
Description copied from interface:IDropdownEntryListenerWill be called when a dropdown entry is selected or completely matches.- Specified by:
onSetDropdownPossiblityin interfaceIDropdownEntryListener- Parameters:
dropdownEntry- The selected entry.
-
createSubGui
public ISubGuiBox createSubGui(int baseX, int baseY, int maxWidth, int maxHeight, ContainerScreenLogicProgrammerBase gui, ContainerLogicProgrammerBase container) - Specified by:
createSubGuiin interfaceIGuiInputElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Specified by:
createSubGuiin classValueTypeLPElementBase- Parameters:
baseX- Base xbaseY- Base ymaxWidth- Max widthmaxHeight- Max heightgui- The parent guicontainer- The parent container- Returns:
- A subgui that is shown when activated.
-