Interface IAspectProperties

All Known Implementing Classes:
AspectProperties

public interface IAspectProperties
A property that can be used inside aspects.
  • Method Details Link icon

    • getTypes Link icon

      Deprecated.
      Use this with caution! Better to use IAspect.getPropertyTypes() instead because this object might hold deprecated elements.
      Returns:
      The types.
    • getValue Link icon

      <T extends IValueType<V>, V extends IValue> V getValue(IAspectPropertyTypeInstance<T,V> type)
      Get the value of the given type.
      Type Parameters:
      T - The value type type.
      V - The value type.
      Parameters:
      type - The type to get the value from.
      Returns:
      The value.
    • setValue Link icon

      <T extends IValueType<V>, V extends IValue> void setValue(IAspectPropertyTypeInstance<T,V> type, V value)
      Set the value for the given type.
      Type Parameters:
      T - The value type type.
      V - The value type.
      Parameters:
      type - The type to get the value from.
      value - The value.
    • removeValue Link icon

      <T extends IValueType<V>, V extends IValue> void removeValue(IAspectPropertyTypeInstance<T,V> type)
      Remove the value of the given type.
      Type Parameters:
      T - The value type type.
      V - The value type.
      Parameters:
      type - The type to get the value from.
    • clone Link icon

      Returns:
      A deep copy of the properties.
    • toNBT Link icon

      net.minecraft.nbt.CompoundTag toNBT(ValueDeseralizationContext valueDeseralizationContext)
      Convert the data to an NBT tag.
      Returns:
      The NBT tag.
    • fromNBT Link icon

      void fromNBT(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.CompoundTag tag)
      Read the data from an NBT tag and place it in this object. The given tag will never be null, so make sure that all fields have a correct default value in case the received tag would be null anyways.
      Parameters:
      valueDeseralizationContext - The deserialization context.
      tag - The tag to read from.