Class ValueTypeStringLPElement
java.lang.Object
org.cyclops.integrateddynamics.core.logicprogrammer.ValueTypeLPElementBase
org.cyclops.integrateddynamics.core.logicprogrammer.ValueTypeStringLPElement
- All Implemented Interfaces:
IGuiInputElement<ISubGuiBox,,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> ILogicProgrammerElement<ISubGuiBox,,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> IValueTypeLogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase>
Element for value types that can be read from and written to strings.
-
Nested Class Summary
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.booleanIf this element in its current state can be deactivated because of another item being inserted into the write slot.boolean<G2 extends net.minecraft.client.gui.screens.Screen,C2 extends net.minecraft.world.inventory.AbstractContainerMenu>
GuiElementValueTypeString<G2,C2> createSubGui(int baseX, int baseY, int maxWidth, int maxHeight, ContainerScreenLogicProgrammerBase gui, ContainerLogicProgrammerBase container) voidCalled when this element is deactivated.getValue()booleanisFocused(ISubGuiBox subGui) voidsetFocused(ISubGuiBox subGui, boolean focused) Set the focus of this element.net.minecraft.network.chat.Componentvalidate()Validates the current state of the element.Methods inherited from class org.cyclops.integrateddynamics.core.logicprogrammer.ValueTypeLPElementBase
getColor, getItemStackSizeLimit, getMatchString, getName, getRenderPattern, getSymbol, getType, isFor, isItemValidForSlot, loadElement, loadTooltip, matchesInput, matchesOutput, onInputSlotUpdated, setValue, setValueInContainer, setValueInGui, 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
-
ValueTypeStringLPElement
-
-
Method Details
-
createInnerGuiElement
@Nullable public <G2 extends net.minecraft.client.gui.screens.Screen,C2 extends net.minecraft.world.inventory.AbstractContainerMenu> GuiElementValueTypeString<G2,C2> createInnerGuiElement()- Specified by:
createInnerGuiElementin interfaceIValueTypeLogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
createInnerGuiElementin classValueTypeLPElementBase- Type Parameters:
G2- The type of gui.C2- The type of container.- Returns:
- Create an inner gui element for modifying the value, may be null if it doesn't apply.
-
getInnerGuiElement
public GuiElementValueTypeString<ContainerScreenLogicProgrammerBase,ContainerLogicProgrammerBase> getInnerGuiElement()- Overrides:
getInnerGuiElementin classValueTypeLPElementBase
-
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.
-
canCurrentlyReadFromOtherItem
public boolean canCurrentlyReadFromOtherItem()Description copied from interface:ILogicProgrammerElementIf this element in its current state can be deactivated because of another item being inserted into the write slot.- Specified by:
canCurrentlyReadFromOtherItemin interfaceILogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
canCurrentlyReadFromOtherItemin classValueTypeLPElementBase- Returns:
- If this element can be deactivated.
-
activate
public void activate()Description copied from interface:IGuiInputElementCalled when this element is activated.- Specified by:
activatein interfaceIGuiInputElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
activatein classValueTypeLPElementBase
-
deactivate
public void deactivate()Description copied from interface:IGuiInputElementCalled when this element is deactivated.- Specified by:
deactivatein interfaceIGuiInputElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
deactivatein classValueTypeLPElementBase
-
validate
public net.minecraft.network.chat.Component validate()Description copied from interface:IGuiInputElementValidates the current state of the element.- Returns:
- An error or null.
-
getValue
- Returns:
- The current value.
-
isFocused
- Specified by:
isFocusedin interfaceILogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
isFocusedin classValueTypeLPElementBase- Parameters:
subGui- The corresponding sub gui of this element.- Returns:
- If this element has the active focus. For typing and things like that.
-
setFocused
Description copied from interface:ILogicProgrammerElementSet the focus of this element.- Specified by:
setFocusedin interfaceILogicProgrammerElement<ISubGuiBox,ContainerScreenLogicProgrammerBase, ContainerLogicProgrammerBase> - Overrides:
setFocusedin classValueTypeLPElementBase- Parameters:
subGui- The corresponding sub gui of this element.focused- If it must be focused.
-
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.
-