Package org.core.entity
Interface EntitySnapshot<E extends LiveEntity>
- Type Parameters:
E
- The live entity type of this EntitySnapshot
- All Superinterfaces:
Entity<EntitySnapshot<? extends LiveEntity>>
,Positionable<SyncExactPosition>
- All Known Subinterfaces:
BatSnapshot
,ChickenSnapshot
,ClassicZombieSnapshot
,CodSnapshot
,CowSnapshot
,CreeperEntitySnapshot
,DroppedItemSnapshot
,EntitySnapshot.NoneDestructibleSnapshot<E>
,HumanSnapshot
,ItemFrameSnapshot
,MinecartSnapshot
,ParrotSnapshot
,PlayerSnapshot
,SnowballEntitySnapshot
public interface EntitySnapshot<E extends LiveEntity>
extends Entity<EntitySnapshot<? extends LiveEntity>>
The base class for EntitySnapshots. An EntitySnapshot is a Entity that isn't in the world that
you can create multiple Entities from.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of this snapshot with all values copied over as new instancesIf the entity is based on a LiveEntity then this will be returnable.Spawn the entity in the current condition of the snapshotMethods inherited from interface org.core.entity.Entity
addPassengers, addPassengers, clearPassengers, getAttachedTo, getCustomNameComponent, getFacingDirection, getPassengers, getPitch, getPosition, getRoll, getType, getVelocity, getYaw, hasGravity, hasPassengers, isCustomNameVisible, isOnGround, isRemoved, removePassengers, removePassengers, setCustomName, setCustomName, setCustomNameVisible, setGravity, setPitch, setPosition, setPosition, setPosition, setPosition, setRoll, setVelocity, setVelocity, setYaw
-
Method Details
-
spawnEntity
E spawnEntity()Spawn the entity in the current condition of the snapshot- Returns:
- Spawns the entity
-
createSnapshot
EntitySnapshot<E> createSnapshot()Creates a new instance of this snapshot with all values copied over as new instances- Specified by:
createSnapshot
in interfaceEntity<E extends LiveEntity>
- Returns:
- A new snapshot
-
getCreatedFrom
If the entity is based on a LiveEntity then this will be returnable.- Returns:
- Optional of the original entity
-