Contents
Class EntityFreezeSnapshot
java.lang.Object
com.hypixel.hytale.builtin.buildertools.snapshot.EntityFreezeSnapshot
- All Implemented Interfaces:
EntitySnapshot<EntityFreezeSnapshot>, SelectionSnapshot<EntityFreezeSnapshot>
Represents the freeze state (and transform) of an entity before a freeze/unfreeze toggle.
When undoing an unfreeze, the entity is re-frozen and snapped back to where it was. When undoing a freeze, the entity is simply unfrozen.
-
Constructor Summary
ConstructorsConstructorDescriptionEntityFreezeSnapshot(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) -
Method Summary
Modifier and TypeMethodDescriptionrestoreEntity(PlayerRef playerRef, World world, ComponentAccessor<EntityStore> componentAccessor) voidupdateEntityRef(Ref<EntityStore> oldRef, Ref<EntityStore> newRef) Updates the entity reference held by this snapshot.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EntitySnapshot
restoreMethods inherited from interface SelectionSnapshot
estimatedBlockWeight
-
Constructor Details
-
EntityFreezeSnapshot
public EntityFreezeSnapshot(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
-
-
Method Details
-
updateEntityRef
Description copied from interface:EntitySnapshotUpdates the entity reference held by this snapshot. Called when an entity is re-created after an undo of a remove operation, so that earlier snapshots in the history can track the new ref instead of the now-invalid old one.- Specified by:
updateEntityRefin interfaceEntitySnapshot<EntityFreezeSnapshot>- Parameters:
oldRef- the previous (now invalid) entity referencenewRef- the new entity reference after re-creation
-
restoreEntity
public EntityFreezeSnapshot restoreEntity(@Nonnull PlayerRef playerRef, @Nonnull World world, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
restoreEntityin interfaceEntitySnapshot<EntityFreezeSnapshot>
-