Interface StoredEntity<T extends Entity>

All Superinterfaces:
Nameable, PersistentDataHolder

public interface StoredEntity<T extends Entity> extends PersistentDataHolder, Nameable
Represents an entity stored in a block
See Also:
  • Method Details

    • hasBeenReleased

      boolean hasBeenReleased()
      Checks if this entity has been released yet
      Returns:
      if this entity has been released
    • release

      @Nullable T release()
      Releases the entity from its stored block
      Returns:
      the released entity, or null if unsuccessful (including if this entity has already been released)
    • getBlockStorage

      Returns the block in which this entity is stored
      Returns:
      the EntityBlockStorage in which this entity is stored, or null if it has been released
    • getType

      Gets the entity type of this stored entity
      Returns:
      the type of entity this stored entity represents
    • update

      void update()
      Writes data to the block entity snapshot. BlockState.update() must be run in order to update the block in game.