Class PartStateReaderBase<P extends IPartTypeReader>
java.lang.Object
org.cyclops.integrateddynamics.core.part.PartStateBase<P>
org.cyclops.integrateddynamics.core.part.read.PartStateReaderBase<P>
- All Implemented Interfaces:
org.cyclops.cyclopscore.persist.IDirtyMarkListener,IPartState<P>,IPartStateReader<P>
public class PartStateReaderBase<P extends IPartTypeReader>
extends PartStateBase<P>
implements IPartStateReader<P>
A default implementation of the
IPartStateReader.-
Field Summary
Fields inherited from interface org.cyclops.integrateddynamics.api.part.IPartState
GLOBALCOUNTER_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V extends IValue,T extends IValueType<V>>
IAspectVariable<V> getVariable(IAspectRead<V, T> aspect) Get the singleton variable for an aspect.voidReset all cached aspect variables.voidsetAspectProperties(IAspect aspect, IAspectProperties properties) Set the properties for the given aspect.voidsetVariable(IAspect aspect, IAspectVariable variable) Get the singleton variable for an aspect.Methods inherited from class org.cyclops.integrateddynamics.core.part.PartStateBase
addVolatileCapability, clearInventoriesNamed, forceBlockRenderUpdate, gatherCapabilities, generateId, getAspectProperties, getCapability, getChannel, getDefaultUpdateInterval, getId, getInventoriesNamed, getInventoryNamed, getMaxOffset, getOffsetVariableError, getPriority, getTargetOffset, getTargetSideOverride, getUpdateInterval, initializeOffsets, isDirtyAndReset, isEnabled, isForceBlockRenderUpdateAndReset, isUpdateAndReset, markDirty, markOffsetVariablesChanged, onDirty, readAspectProperties, readFromNBT, removeVolatileCapability, requiresOffsetUpdates, sendUpdate, setChannel, setEnabled, setInventoryNamed, setMaxOffset, setPriority, setTargetOffset, setTargetSideOverride, setUpdateInterval, updateOffsetVariables, writeAspectProperties, writeToNBTMethods 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
addVolatileCapability, clearInventoriesNamed, forceBlockRenderUpdate, gatherCapabilities, generateId, getAspectProperties, getCapability, getChannel, getId, getInventoriesNamed, getInventoryNamed, getMaxOffset, getOffsetVariableError, getPriority, getTargetOffset, getTargetSideOverride, getUpdateInterval, initializeOffsets, isDirtyAndReset, isEnabled, isForceBlockRenderUpdateAndReset, isUpdateAndReset, loadInventoryNamed, markDirty, markOffsetVariablesChanged, readFromNBT, removeVolatileCapability, requiresOffsetUpdates, saveInventoryNamed, setChannel, setEnabled, setInventoryNamed, setMaxOffset, setPriority, setTargetOffset, setTargetSideOverride, setUpdateInterval, updateOffsetVariables, writeToNBT
-
Constructor Details
-
PartStateReaderBase
public PartStateReaderBase()
-
-
Method Details
-
getVariable
public <V extends IValue,T extends IValueType<V>> IAspectVariable<V> getVariable(IAspectRead<V, T> aspect) Description copied from interface:IPartStateReaderGet the singleton variable for an aspect. This only retrieves the previously stored state. Better to callIPartTypeReader.getVariable(PartTarget, IPartStateReader, IAspectRead).- Specified by:
getVariablein interfaceIPartStateReader<P extends IPartTypeReader>- Type Parameters:
V- The value typeT- The value type type- Parameters:
aspect- The aspect from the part of this state.- Returns:
- The variable that exists only once for an aspect in this part state.
-
setVariable
Description copied from interface:IPartStateReaderGet the singleton variable for an aspect.- Specified by:
setVariablein interfaceIPartStateReader<P extends IPartTypeReader>- Parameters:
aspect- The aspect from the part of this state.variable- The variable that exists only once for an aspect in this part state.
-
resetVariables
public void resetVariables()Description copied from interface:IPartStateReaderReset all cached aspect variables.- Specified by:
resetVariablesin interfaceIPartStateReader<P extends IPartTypeReader>
-
setAspectProperties
Description copied from interface:IPartStateSet the properties for the given aspect.- Specified by:
setAspectPropertiesin interfaceIPartState<P extends IPartTypeReader>- Overrides:
setAspectPropertiesin classPartStateBase<P extends IPartTypeReader>- Parameters:
aspect- The aspect to get the properties from.properties- The properties, this can be null if still the default.
-