Contents
Class EntityScaleSnapshot
java.lang.Object
com.hypixel.hytale.builtin.buildertools.snapshot.EntityScaleSnapshot
- All Implemented Interfaces:
EntitySnapshot<EntityScaleSnapshot>, SelectionSnapshot<EntityScaleSnapshot>
Represents the scale of an entity before a scale operation.
Restoring this snapshot will set the entity back to its previous scale.
-
Constructor Summary
ConstructorsConstructorDescriptionEntityScaleSnapshot(Ref<EntityStore> ref, float scale) EntityScaleSnapshot(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) -
Method Summary
Modifier and TypeMethodDescriptiongetRef()restoreEntity(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
-
EntityScaleSnapshot
-
EntityScaleSnapshot
public EntityScaleSnapshot(@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<EntityScaleSnapshot>- Parameters:
oldRef- the previous (now invalid) entity referencenewRef- the new entity reference after re-creation
-
getRef
-
restoreEntity
public EntityScaleSnapshot restoreEntity(@Nonnull PlayerRef playerRef, @Nonnull World world, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
restoreEntityin interfaceEntitySnapshot<EntityScaleSnapshot>
-