Class MapBasedEntityStorage<T extends net.minecraft.world.entity.Entity>
java.lang.Object
com.pixelmonmod.pixelmon.api.entity.npc.storage.MapBasedEntityStorage<T>
- All Implemented Interfaces:
EntityStorage<T>
,Iterable<StoredEntity<T>>
- Direct Known Subclasses:
NBTEntityStorage
public abstract class MapBasedEntityStorage<T extends net.minecraft.world.entity.Entity>
extends Object
implements EntityStorage<T>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an entity to be tracked and storedFinds the entity storage for the given UUIDgetAll()
Gets all the entities that are being tracked@NotNull Iterator<StoredEntity<T>>
iterator()
void
Removes an entity from being tracked and storedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.entity.npc.EntityStorage
load, save
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
trackedEntities
-
-
Constructor Details
-
MapBasedEntityStorage
public MapBasedEntityStorage()
-
-
Method Details
-
add
Description copied from interface:EntityStorage
Adds an entity to be tracked and stored- Specified by:
add
in interfaceEntityStorage<T extends net.minecraft.world.entity.Entity>
- Parameters:
entity
- The entity to add
-
remove
Description copied from interface:EntityStorage
Removes an entity from being tracked and stored- Specified by:
remove
in interfaceEntityStorage<T extends net.minecraft.world.entity.Entity>
- Parameters:
entity
- The entity to remove
-
find
Description copied from interface:EntityStorage
Finds the entity storage for the given UUID- Specified by:
find
in interfaceEntityStorage<T extends net.minecraft.world.entity.Entity>
- Parameters:
uuid
- The UUID of the entity- Returns:
- The entity storage
-
getAll
Description copied from interface:EntityStorage
Gets all the entities that are being tracked- Specified by:
getAll
in interfaceEntityStorage<T extends net.minecraft.world.entity.Entity>
- Returns:
- The entities
-
iterator
-