Contents
Class EntityRemoveSnapshot
java.lang.Object
com.hypixel.hytale.builtin.buildertools.snapshot.EntityRemoveSnapshot
- All Implemented Interfaces:
EntitySnapshot<EntityAddSnapshot>, SelectionSnapshot<EntityAddSnapshot>
Represents an entity that has been removed from the world during a tool operation.
Restoring this snapshot has the effect of re-creating and respawning the entity that was removed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrestoreEntity(PlayerRef playerRef, World world, ComponentAccessor<EntityStore> componentAccessor) Called to restore the entity that was removed.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EntitySnapshot
restore, updateEntityRefMethods inherited from interface SelectionSnapshot
estimatedBlockWeight
-
Constructor Details
-
EntityRemoveSnapshot
Default Constructor for aEntityRemoveSnapshotinstance.- Parameters:
ref- The entity reference of the entity that was removed.
-
-
Method Details
-
getOriginalRef
- Returns:
- the original entity reference at the time of removal.
-
getHolder
- Returns:
- the holder containing the entity store data of the removed entity.
-
restoreEntity
public EntityAddSnapshot restoreEntity(@Nonnull PlayerRef playerRef, @Nonnull World world, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Called to restore the entity that was removed.- Specified by:
restoreEntityin interfaceEntitySnapshot<EntityAddSnapshot>- Parameters:
playerRef- The player reference performing the restoration.world- The world in which the entity is to be restored.componentAccessor- TheComponentAccessor<EntityStore>for component access.- Returns:
- the
EntityAddSnapshotrepresenting the restored entity.
-