Contents
Interface SelectionSnapshot<T extends SelectionSnapshot<?>>
- Type Parameters:
T- The type of snapshot to be returned when restoring this one.
- All Known Subinterfaces:
ClipboardSnapshot<T>, EntitySnapshot<T>
- All Known Implementing Classes:
BlockSelectionSnapshot, ClipboardBoundsSnapshot, ClipboardContentsSnapshot, EntityAddSnapshot, EntityFreezeSnapshot, EntityRemoveSnapshot, EntityScaleSnapshot, EntitySettingsSnapshot, EntityTransformSnapshot, PointSnapshot, TriggerVolumeGroupSnapshot, TriggerVolumeSnapshot
public interface SelectionSnapshot<T extends SelectionSnapshot<?>>
Represents a restorable state of a subject (block/entity) captured just before an operation is applied that would change that state.
-
Method Summary
Modifier and TypeMethodDescriptiondefault longrestore(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.
-
Method Details
-
restore
@Nullable T 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.- 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.
-
estimatedBlockWeight
default long estimatedBlockWeight()
-