Interface IPartStateReader<P extends IPartTypeReader>

All Superinterfaces:
IPartState<P>
All Known Implementing Classes:
PartStateReaderBase

public interface IPartStateReader<P extends IPartTypeReader> extends IPartState<P>
A value holder for an IPartTypeReader. This is what will be serialized from and to NBT. This object is mutable and should not be recreated.
  • Method Details

    • getVariable

      <V extends IValue, T extends IValueType<V>> IAspectVariable<V> getVariable(IAspectRead<V,T> aspect)
      Get the singleton variable for an aspect. This only retrieves the previously stored state. Better to call IPartTypeReader.getVariable(PartTarget, IPartStateReader, IAspectRead).
      Type Parameters:
      V - The value type
      T - 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

      void setVariable(IAspect aspect, IAspectVariable variable)
      Get the singleton variable for an aspect.
      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

      void resetVariables()
      Reset all cached aspect variables.