Class PartTypeConnectorMonoDirectional.State
java.lang.Object
org.cyclops.integrateddynamics.core.part.PartStateBase<PartTypeConnectorMonoDirectional>
org.cyclops.integrateddynamics.part.PartTypeConnector.State<PartTypeConnectorMonoDirectional>
org.cyclops.integrateddynamics.part.PartTypeConnectorMonoDirectional.State
- All Implemented Interfaces:
Comparable<IPathElement>,org.cyclops.cyclopscore.persist.IDirtyMarkListener,IPartState<PartTypeConnectorMonoDirectional>,IPathElement
- Enclosing class:
PartTypeConnectorMonoDirectional
public static class PartTypeConnectorMonoDirectional.State
extends PartTypeConnector.State<PartTypeConnectorMonoDirectional>
-
Field Summary
Fields inherited from interface org.cyclops.integrateddynamics.api.part.IPartState
GLOBALCOUNTER_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprotected static org.cyclops.cyclopscore.datastructure.DimPosgetTargetPos(PartPos origin, int offset) protected PartTypeConnectorMonoDirectional.StategetTargetState(PartPos origin) protected static PartTypeConnectorMonoDirectional.StategetTargetState(PartPos origin, int offset) protected static PartTypeConnectorMonoDirectional.StategetUnboundTargetState(PartPos origin, int offset) booleanvoidreadFromNBT(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.CompoundTag tag) Read a state from NBT.voidvoidsetOffset(int offset) Set the raw offset.voidsetTarget(int offset) voidwriteToNBT(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.CompoundTag tag) Write a state to NBT.Methods inherited from class org.cyclops.integrateddynamics.part.PartTypeConnector.State
compareTo, getCapability, getPartPos, getPosition, setPositionMethods inherited from class org.cyclops.integrateddynamics.core.part.PartStateBase
addVolatileCapability, clearInventoriesNamed, forceBlockRenderUpdate, gatherCapabilities, generateId, getAspectProperties, getChannel, getDefaultUpdateInterval, getId, getInventoriesNamed, getInventoryNamed, getMaxOffset, getOffsetVariableError, getPriority, getTargetOffset, getTargetSideOverride, getUpdateInterval, initializeOffsets, isDirtyAndReset, isEnabled, isForceBlockRenderUpdateAndReset, isUpdateAndReset, markDirty, markOffsetVariablesChanged, onDirty, readAspectProperties, removeVolatileCapability, requiresOffsetUpdates, sendUpdate, setAspectProperties, setChannel, setEnabled, setInventoryNamed, setMaxOffset, setPriority, setTargetOffset, setTargetSideOverride, setUpdateInterval, updateOffsetVariables, writeAspectPropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.part.IPartState
loadInventoryNamed, saveInventoryNamed
-
Constructor Details
-
State
public State()
-
-
Method Details
-
getReachableElements
- Returns:
- The set of all path elements that can be reached from here.
-
setTarget
public void setTarget(int offset) -
hasTarget
public boolean hasTarget() -
getOffset
public int getOffset() -
setOffset
public void setOffset(int offset) Set the raw offset. PrefersetTarget(int).- Parameters:
offset- The new offset.
-
removeTarget
public void removeTarget() -
getTargetState
-
writeToNBT
public void writeToNBT(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.CompoundTag tag) Description copied from interface:IPartStateWrite a state to NBT.- Specified by:
writeToNBTin interfaceIPartState<PartTypeConnectorMonoDirectional>- Overrides:
writeToNBTin classPartStateBase<PartTypeConnectorMonoDirectional>- Parameters:
valueDeseralizationContext-tag- The tag to write to.
-
readFromNBT
public void readFromNBT(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.CompoundTag tag) Description copied from interface:IPartStateRead a state from NBT.- Specified by:
readFromNBTin interfaceIPartState<PartTypeConnectorMonoDirectional>- Overrides:
readFromNBTin classPartStateBase<PartTypeConnectorMonoDirectional>- Parameters:
valueDeseralizationContext- Getter for blocks.tag- The tag to read from.
-
getUnboundTargetState
protected static PartTypeConnectorMonoDirectional.State getUnboundTargetState(PartPos origin, int offset) -
getTargetState
-
getTargetPos
protected static org.cyclops.cyclopscore.datastructure.DimPos getTargetPos(PartPos origin, int offset)
-