Annotation Interface NBTPersist


@Retention(RUNTIME) @Target(FIELD) public @interface NBTPersist
If this field should be persisted in Tile Entities. Fields that are a subtype of INBTSerializable must not be null, they should have a dummy value that will then be populated with the actual values. It will automatically be added to CyclopsBlockEntity.saveAdditional(CompoundTag) and CyclopsBlockEntity.load(CompoundTag).
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If set to true, NBT tags that don't contain the key for this field will return a default value as set by Cyclops.
  • Element Details

    • useDefaultValue

      boolean useDefaultValue
      If set to true, NBT tags that don't contain the key for this field will return a default value as set by Cyclops. Otherwise, NBT tags that don't contain a key for this field will not be overwritten.
      Returns:
      true if non-existing NBT keys are overwritten with a default value, or false otherwise.
      Default:
      true