Interface EntityStorage<T extends net.minecraft.world.entity.Entity>

All Superinterfaces:
Iterable<StoredEntity<T>>
All Known Implementing Classes:
MapBasedEntityStorage, NBTEntityStorage

public interface EntityStorage<T extends net.minecraft.world.entity.Entity> extends Iterable<StoredEntity<T>>
This is used for storing important data about NPCs that exist in the world and were placed by an admin.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(T entity)
    Adds an entity to be tracked and stored
    find(UUID uuid)
    Finds the entity storage for the given UUID
    Gets all the entities that are being tracked
    void
    Loads the entities from the storage
    void
    remove(T entity)
    Removes an entity from being tracked and stored
    void
    Saves the entities to the storage

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • add

      void add(T entity)
      Adds an entity to be tracked and stored
      Parameters:
      entity - The entity to add
    • remove

      void remove(T entity)
      Removes an entity from being tracked and stored
      Parameters:
      entity - The entity to remove
    • find

      StoredEntity<T> find(UUID uuid)
      Finds the entity storage for the given UUID
      Parameters:
      uuid - The UUID of the entity
      Returns:
      The entity storage
    • getAll

      List<StoredEntity<T>> getAll()
      Gets all the entities that are being tracked
      Returns:
      The entities
    • load

      void load()
      Loads the entities from the storage
    • save

      void save()
      Saves the entities to the storage