Contents
Class BlockSelectionSnapshot
java.lang.Object
com.hypixel.hytale.builtin.buildertools.snapshot.BlockSelectionSnapshot
- All Implemented Interfaces:
SelectionSnapshot<BlockSelectionSnapshot>
public class BlockSelectionSnapshot
extends Object
implements SelectionSnapshot<BlockSelectionSnapshot>
Represents a block selection in the world prior to modifications.
Restoring this snapshot will place the the block selection back into the world.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockSelectionSnapshotcopyOf(BlockSelection selection) Helper method for creating aBlockSelectionSnapshotusing a clone of the provided BlockSelection.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.
-
Constructor Details
-
BlockSelectionSnapshot
-
-
Method Details
-
getBlockSelection
-
estimatedBlockWeight
public long estimatedBlockWeight()- Specified by:
estimatedBlockWeightin interfaceSelectionSnapshot<BlockSelectionSnapshot>
-
restore
public BlockSelectionSnapshot restore(Ref<EntityStore> ref, PlayerRef playerRef, @Nonnull 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<BlockSelectionSnapshot>- 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.
-
copyOf
Helper method for creating aBlockSelectionSnapshotusing a clone of the provided BlockSelection.- Parameters:
selection- The BlockSelection to create a cloned snapshot of.- Returns:
- A new BlockSelectionSnapshot for the BlockSelection.
-