BuilderToolsPlugin.ActionEntry
Package: com.hypixel.hytale.builtin.buildertools
public static class ActionEntryPairs an Action type with a list of SelectionSnapshot<?> objects that can be restored for undo/redo. Stored in the undo and redo queues of BuilderState.
Constructors
Section titled “Constructors”public ActionEntry(BuilderToolsPlugin.Action action, SelectionSnapshot<?> snapshots)Creates an entry with a single snapshot (wrapped in a singleton list).
public ActionEntry(BuilderToolsPlugin.Action action, List<SelectionSnapshot<?>> snapshots)Creates an entry with multiple snapshots.
Methods
Section titled “Methods”getAction
Section titled “getAction”public BuilderToolsPlugin.Action getAction()Returns the action type.
restore
Section titled “restore”@Nonnullpublic BuilderToolsPlugin.ActionEntry restore(Ref<EntityStore> ref, Player player, World world, ComponentAccessor<EntityStore> componentAccessor)Restores all snapshots and returns a new ActionEntry containing the inverse snapshots (for re-doing the undo, or vice versa). Each snapshot’s restore() produces a new snapshot representing the state before the restore.
For ROTATE actions, special handling removes entities from the previous rotation (via EntityRemoveSnapshot) before processing the remaining snapshots, and tracks newly created entity refs in PrototypePlayerBuilderToolSettings for future undo operations.
Related Types
Section titled “Related Types”- BuilderToolsPlugin.Action — the action enum
- BuilderToolsPlugin.BuilderState — stores entries in undo/redo queues