Contents
Class PointSnapshot
java.lang.Object
com.hypixel.hytale.builtin.points.snapshot.PointSnapshot
- All Implemented Interfaces:
SelectionSnapshot<PointSnapshot>
Undo/redo unit for point create, move, rotate, and delete. CREATE stores only identity (its
inverse deletes), DELETE/MUTATE capture full state.
restore(Ref, PlayerRef, World, ComponentAccessor) runs on the world thread
and returns the inverse snapshot.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic PointSnapshotofCreate(PointEntry entry) static PointSnapshotofDelete(PointEntry entry) static PointSnapshotofMutate(PointEntry entry) restore(Ref<EntityStore> ref, PlayerRef playerRef, World world, ComponentAccessor<EntityStore> componentAccessor) Restore the state represented by this snapshot, optionally returning a new snapshot of the subject's current state.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SelectionSnapshot
estimatedBlockWeight
-
Method Details
-
ofCreate
-
ofDelete
-
ofMutate
-
restore
@Nullable public PointSnapshot restore(@Nonnull Ref<EntityStore> ref, PlayerRef playerRef, World world, ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:SelectionSnapshotRestore the state represented by this snapshot, optionally returning a new snapshot of the subject's current state.- Specified by:
restorein interfaceSelectionSnapshot<PointSnapshot>- Parameters:
ref-playerRef- The Player reference invoking the buildertool operation.world- The World in which the operation is taking place.componentAccessor-- Returns:
- A new snapshot of the subject prior to restoring its state or null.
-