Class AspectReadBase<V extends IValue,T extends IValueType<V>>

java.lang.Object
org.cyclops.integrateddynamics.part.aspect.AspectBase<V,T>
org.cyclops.integrateddynamics.part.aspect.read.AspectReadBase<V,T>
All Implemented Interfaces:
IAspect<V,T>, IAspectRead<V,T>

public abstract class AspectReadBase<V extends IValue,T extends IValueType<V>> extends AspectBase<V,T> implements IAspectRead<V,T>
Base class for read aspects.
  • Constructor Details

  • Method Details

    • update

      public <P extends IPartType<P, S>, S extends IPartState<P>> void update(INetwork network, IPartNetwork partNetwork, P partType, PartTarget target, S state)
      Description copied from interface: IAspect
      Called inside part types for updating a part on a block.
      Specified by:
      update in interface IAspect<V extends IValue,T extends IValueType<V>>
      Type Parameters:
      P - The part type type.
      S - The part state.
      Parameters:
      network - The network to update in.
      partNetwork - The part network to update in.
      partType - The part type.
      target - The position that is targeted by the given part.
      state - The current state of the given part.
    • getUnlocalizedType

      protected String getUnlocalizedType()
      Specified by:
      getUnlocalizedType in class AspectBase<V extends IValue,T extends IValueType<V>>
    • registerModelResourceLocation

      protected void registerModelResourceLocation()
    • getValue

      protected abstract V getValue(PartTarget target, IAspectProperties properties) throws EvaluationException
      This is only called lazy.
      Parameters:
      target - The target to get the value for.
      properties - The optional properties for this aspect.
      Returns:
      The value that will be inserted into a variable so it can be used elsewhere.
      Throws:
      EvaluationException - If evaluation has gone wrong.
    • createNewVariable

      public IAspectVariable<V> createNewVariable(Supplier<PartTarget> target)
      Description copied from interface: IAspectRead
      Creates a new variable for this aspect.
      Specified by:
      createNewVariable in interface IAspectRead<V extends IValue,T extends IValueType<V>>
      Parameters:
      target - The target supplier for this aspect.
      Returns:
      The variable pointing to the given target.
    • getUpdateType

      public AspectUpdateType getUpdateType()
      Specified by:
      getUpdateType in interface IAspectRead<V extends IValue,T extends IValueType<V>>
      Returns:
      The update type on which this aspect should invalidate.