Class BuilderToolsPlugin.BuilderState

java.lang.Object
com.hypixel.hytale.builtin.buildertools.BuilderToolsPlugin.BuilderState
Enclosing class:
BuilderToolsPlugin

public static class BuilderToolsPlugin.BuilderState extends Object
  • Method Details

    • syncRawPositions

      public void syncRawPositions()
    • addToQueue

      public <T extends Throwable> void addToQueue(@Nonnull ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task)
    • addToQueue

      public <T extends Throwable> void addToQueue(long estimatedBlockChanges, @Nonnull ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task)
    • addToQueue

      public <T extends Throwable> void addToQueue(long estimatedBlockChanges, @Nullable BuilderToolsPlugin.TaskRegion region, @Nonnull ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task)
    • selectionRegion

      @Nonnull public CompletableFuture<Void> selectionRegion(@Nonnull World world, @Nonnull org.joml.Vector3ic offset, @Nonnull PrefetchLease lease)
      The area the current selection covers, together with where an edit moves it to.
    • selectionExtrudeRegion

      @Nonnull public CompletableFuture<Void> selectionExtrudeRegion(@Nonnull World world, @Nonnull org.joml.Vector3ic direction, int depth, int spacing, @Nonnull PrefetchLease lease)
      The area the current selection covers, together with where an extrude of it copies to.
    • computeSelectionCopy

      public <T extends Throwable> void computeSelectionCopy(@Nonnull ThrowableConsumer<BlockSelection, T> task)
    • discardQueuedTasks

      public void discardQueuedTasks()
      Drops every queued task and lets go of the chunks their areas loaded. A lease left behind would keep its chunks in memory for the life of the world.
    • runTask

      public void runTask()
    • getTaskCount

      public int getTaskCount()
    • getUndoCount

      public int getUndoCount()
    • getRedoCount

      public int getRedoCount()
    • getDisplayName

      public String getDisplayName()
    • getUserData

      @Nonnull public BuilderToolsUserData getUserData()
    • getTaskFuture

      @Nullable public CompletableFuture<Void> getTaskFuture()
    • getSelection

      @Nullable public BlockSelection getSelection()
    • prefetchBudget

      @Nonnull public Prefetch.Budget prefetchBudget()
      How much a load this state asks for may bring in. See Prefetch.Budget.
    • getGlobalMask

      public BlockMask getGlobalMask()
    • getRandom

      @Nonnull public Random getRandom()
    • setSelection

      public void setSelection(@Nonnull BlockSelection selection)
    • setSkipNextPreviewRebuild

      public void setSkipNextPreviewRebuild(boolean skip)
    • sendSelectionToClient

      public void sendSelectionToClient()
      Sends the current selection (clipboard) to the client. Call this after setSelection() to update the client's paste tool preview.
    • setActivePrefabPath

      public void setActivePrefabPath(UUID path)
    • getActivePrefabPath

      public UUID getActivePrefabPath()
    • getPrefabListRoot

      @Nullable public Path getPrefabListRoot()
    • setPrefabListRoot

      public void setPrefabListRoot(@Nullable Path prefabListRoot)
    • getPrefabListPath

      @Nullable public Path getPrefabListPath()
    • setPrefabListPath

      public void setPrefabListPath(@Nullable Path prefabListPath)
    • getPrefabListSearchQuery

      @Nullable public String getPrefabListSearchQuery()
    • setPrefabListSearchQuery

      public void setPrefabListSearchQuery(@Nullable String prefabListSearchQuery)
    • edit

      public int edit(@Nonnull Ref<EntityStore> ref, @Nonnull BuilderToolOnUseInteraction packet, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • placeBrushConfig

      public void placeBrushConfig(@Nonnull Ref<EntityStore> ref, long startTime, @Nonnull BrushConfigEditStore brushConfigEditStore, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • flood

      public void flood(@Nonnull EditOperation editOperation, int x, int y, int z, int shapeWidth, int shapeHeight, @Nonnull BlockPattern pattern, int targetBlockId)
    • isAsideAir

      public boolean isAsideAir(@Nonnull BlockReader accessor, int x, int y, int z)
    • isAsideBlock

      public boolean isAsideBlock(@Nonnull BlockReader accessor, int x, int y, int z)
    • getBlocksSampleData

      @Nonnull public BuilderToolsPlugin.BuilderState.BlocksSampleData getBlocksSampleData(@Nonnull BlockReader accessor, int x, int y, int z, int radius)
      Check within a square of a radius for the amount and type of the most-occurring block type
    • getBlocksSmoothData

      @Nonnull public BuilderToolsPlugin.BuilderState.SmoothSampleData getBlocksSmoothData(@Nonnull BlockReader accessor, int x, int y, int z)
    • editLine

      public void editLine(int x1, int y1, int z1, int x2, int y2, int z2, BlockPattern material, int lineWidth, int lineHeight, int wallThickness, BrushShape shape, BrushOrigin origin, int spacing, int density, @Nullable BlockMask mask, ComponentAccessor<EntityStore> componentAccessor)
    • extendOrShrinkFace

      public void extendOrShrinkFace(int x, int y, int z, int normalX, int normalY, int normalZ, int depth, int extrudeWidth, int extrudeLength, boolean shrink, @Nonnull BlockPattern pattern, @Nonnull String filterMode, @Nonnull String strategy, int undoGroupSize, boolean isHoldDown, ComponentAccessor<EntityStore> componentAccessor)
    • fillVolume

      public void fillVolume(int x, int y, int z, int normalX, int normalY, int normalZ, int fillDepth, int fillWidth, int fillHeight, @Nonnull BlockPattern pattern, int undoGroupSize, boolean isHoldDown, ComponentAccessor<EntityStore> componentAccessor)
    • applyRecoloring

      public void applyRecoloring(int targetX, int targetY, int targetZ, int width, int height, @Nonnull BlockPattern replacementPattern, boolean smartMatch, @Nonnull BrushShape brushShape, int undoGroupSize, boolean isHoldDown, @Nonnull BlockColorIndex blockColorIndex, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • applyGradient

      public void applyGradient(int targetX, int targetY, int targetZ, int width, int height, int startX, int startY, int startZ, int endX, int endY, int endZ, @Nonnull List<BuilderToolsPlugin.ColorGradientMaterial> materials, @Nonnull String shape, float blendBand, @Nonnull BrushShape brushShape, boolean invert, int undoGroupSize, boolean isHoldDown, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • applyShading

      public void applyShading(int targetX, int targetY, int targetZ, float playerX, float playerY, float playerZ, int width, int height, boolean lighten, boolean autoMode, boolean falloffFromTarget, @Nonnull BuilderToolsPlugin.ShadingLight lightSource, @Nullable int[] customRamp, float intensity, @Nonnull BrushShape brushShape, boolean invert, float edgeBlend, int undoGroupSize, boolean isHoldDown, @Nonnull BlockColorIndex blockColorIndex, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • update

      public void update(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax)
    • tint

      public void tint(@Nonnull Ref<EntityStore> ref, int color, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • environment

      public void environment(@Nonnull Ref<EntityStore> ref, int environmentId, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • copyOrCut

      public int copyOrCut(@Nonnull Ref<EntityStore> ref, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int settings, @Nonnull ComponentAccessor<EntityStore> componentAccessor) throws PrefabCopyException
      Throws:
      PrefabCopyException
    • copyOrCut

      public int copyOrCut(@Nonnull Ref<EntityStore> ref, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int settings, @Nullable org.joml.Vector3i playerAnchor, @Nonnull ComponentAccessor<EntityStore> componentAccessor) throws PrefabCopyException
      Throws:
      PrefabCopyException
    • copyOrCut

      public int copyOrCut(@Nonnull Ref<EntityStore> ref, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int settings, @Nullable org.joml.Vector3i playerAnchor, @Nullable Set<Ref<EntityStore>> skipEntityRemoveSnapshotFor, @Nonnull ComponentAccessor<EntityStore> componentAccessor) throws PrefabCopyException
      Throws:
      PrefabCopyException
    • copyOrCut

      public int copyOrCut(@Nonnull Ref<EntityStore> ref, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int settings, @Nullable org.joml.Vector3i playerAnchor, @Nullable Set<Ref<EntityStore>> skipEntityRemoveSnapshotFor, @Nullable List<SelectionSnapshot<?>> pickupSnapshots, @Nonnull ComponentAccessor<EntityStore> componentAccessor) throws PrefabCopyException
      Parameters:
      pickupSnapshots - non-null when the selection tool picks these blocks up for a transform. The undo snapshots are then collected here instead of pushed, so the pickup and the transform cost one undo press. The pickup also reports nothing to the player, because the transform that follows reports the whole result.
      Throws:
      PrefabCopyException
    • clear

      public int clear(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • transformRotation

      public static RotationTuple transformRotation(RotationTuple prevRot, org.joml.Quaterniond rotation)
      Transforms a block rotation through a quaternion rotation. Uses TWO orthogonal reference vectors to fully determine the rotation. A single vector only has 2 DOF (direction), which loses roll information.
    • transformThenPasteClipboard

      public void transformThenPasteClipboard(@Nonnull BlockChange[] blockChanges, @Nullable PrototypePlayerBuilderToolSettings.FluidChange[] fluidChanges, @Nullable PrototypePlayerBuilderToolSettings.EntityChange[] entityChanges, @Nullable Holder<ChunkStore>[] blockHolders, @Nonnull org.joml.Quaterniond rotation, @Nonnull org.joml.Vector3i translationOffset, @Nonnull Rotation3f rotationOrigin, @Nonnull org.joml.Vector3i initialPastePoint, boolean keepEmptyBlocks, @Nonnull PrototypePlayerBuilderToolSettings prototypeSettings, @Nullable List<SelectionSnapshot<?>> extraSnapshots, ComponentAccessor<EntityStore> componentAccessor)
    • transformSelectionPoints

      public void transformSelectionPoints(@Nonnull org.joml.Quaterniond rotation, @Nonnull org.joml.Vector3i translationOffset, @Nonnull Rotation3f rotationOrigin)
    • transformBlockLocation

      @Nonnull public org.joml.Vector3i transformBlockLocation(@Nonnull org.joml.Vector3i blockLocation, @Nonnull org.joml.Quaterniond rotation, @Nonnull org.joml.Vector3i translationOffset, @Nonnull Rotation3f rotationOrigin)
    • layer

      public void layer(int x, int y, int z, @Nonnull List<it.unimi.dsi.fastutil.Pair<Integer,String>> layers, int depth, org.joml.Vector3ic direction, @Nonnull SectionAccessor accessor, BlockSelection before, BlockSelection after)
      Applies layering to at a single block location. Layering refers to applying a block pattern at a given thickness to a blocks in a selection, and each subsequent layer is applied under the layer before it to create a gradient-esk effect from the surface.

      For example, if I wanted blocks in a selection to have grass on the surface, and 2 blocks of dirt under that grass, I would use this function and have a grass layer with a depth of 1, and the layer after it would have dirt with a depth of 2.

      Parameters:
      x - The x coordinate of the block
      y - The y coordinate of the block
      z - The z coordinate of the block
      layers - The list of layers to apply to the block selection. Each pair in this list represents a layer, and a layer is represented by a pair containing an Integer for it's depth, and a String for it's block pattern.
      depth -
      direction - The direction to apply the layering in as a unit vector. The vector must be a unit vector on a single axis in a given direction. Ex. (0, 1, 0) or (-1, 0, 0), and NOT (0.5, 0.5, 0).
      accessor - The accessor to read the blocks the layering edits are built from.
      before - The BlockSelection before the layer operation takes place.
      after - The BlockSelection after the layer operation takes place.
    • layer

      public void layer(@Nonnull List<it.unimi.dsi.fastutil.Pair<Integer,String>> layers, org.joml.Vector3ic direction, ComponentAccessor<EntityStore> componentAccessor)
      Applies layering across all the blocks in the current block selection. See above layer function for more information on layering.
    • paste

      public int paste(@Nonnull Ref<EntityStore> ref, int x, int y, int z, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • paste

      public int paste(@Nonnull Ref<EntityStore> ref, int x, int y, int z, boolean technicalPaste, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • clipboardRegion

      @Nonnull public CompletableFuture<Void> clipboardRegion(@Nonnull World world, int x, int y, int z, @Nonnull PrefetchLease lease)
      The area the clipboard covers when it is pasted at the position.
    • paste

      public int paste(@Nonnull Ref<EntityStore> ref, int x, int y, int z, boolean technicalPaste, boolean skipAirBlocks, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • rotate

      public void rotate(@Nonnull Ref<EntityStore> ref, @Nonnull Axis axis, int angle, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • rotate

      public void rotate(@Nonnull Ref<EntityStore> ref, @Nonnull Axis axis, int angle, @Nonnull RotateBlockMode rotateBlockMode, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • resetClipboardRotation

      public void resetClipboardRotation(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • rotateArbitrary

      public void rotateArbitrary(@Nonnull Ref<EntityStore> ref, float yaw, float pitch, float roll, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Rotates the selection by arbitrary yaw, pitch, and roll angles. Unlike the axis-based rotate which is limited to 90-degree increments, this method supports any angle but uses inverse mapping which may result in some detail loss for non-90-degree rotations.
      Parameters:
      ref - The player entity reference
      yaw - Yaw rotation in degrees (around Y-axis)
      pitch - Pitch rotation in degrees (around X-axis)
      roll - Roll rotation in degrees (around Z-axis)
      componentAccessor - Component accessor for feedback
    • flip

      public void flip(@Nonnull Ref<EntityStore> ref, @Nonnull Axis axis, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • applyRandomizeTransforms

      public void applyRandomizeTransforms(@Nonnull Ref<EntityStore> ref, int deltaX, int deltaY, int deltaZ, boolean flipX, boolean flipY, boolean flipZ, @Nonnull RotateBlockMode rotateBlockMode, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Applies a batch of rotations and/or flips as a single undo entry. Unlike calling rotate(Ref, Axis, int, ComponentAccessor) and flip(Ref, Axis, ComponentAccessor) separately (each of which pushes its own history entry), this method pushes history exactly once and then applies all requested transforms directly to the selection.
    • hollow

      public void hollow(@Nonnull Ref<EntityStore> ref, int blockId, int thickness, boolean setTop, boolean setBottom, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • walls

      public void walls(@Nonnull Ref<EntityStore> ref, @Nonnull BlockPattern pattern, int thickness, boolean cappedTop, boolean cappedBottom, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Sets walls of the selection with a block pattern.

      Uses weighted random selection from the pattern for each wall position. Supports blocks, fluids, weights, and rotations.

      Parameters:
      ref - the entity reference
      pattern - the block pattern (can include weights and rotations)
      thickness - the wall thickness
      cappedTop - whether to cap the top
      cappedBottom - whether to cap the bottom
      componentAccessor - the component accessor
    • selectionExceedsEditLimit

      public boolean selectionExceedsEditLimit(@Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • set

      public void set(@Nonnull BlockPattern pattern, ComponentAccessor<EntityStore> componentAccessor)
      Sets a block pattern in the selection.

      Uses weighted random selection from the pattern for each position. Supports blocks, fluids, weights, and rotations.

      Parameters:
      pattern - the block pattern (can include weights and rotations)
      componentAccessor - the component accessor
    • submerge

      public void submerge(@Nonnull BlockPattern pattern, ComponentAccessor<EntityStore> componentAccessor)
    • unsubmerge

      public void unsubmerge(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • fill

      public void fill(@Nonnull BlockPattern pattern, ComponentAccessor<EntityStore> componentAccessor)
      Fills empty spaces in the selection with a block pattern.

      Uses weighted random selection from the pattern for each empty position. Supports blocks, fluids, weights, and rotations.

      Parameters:
      pattern - the block pattern to fill with
      componentAccessor - the component accessor
    • floodFill

      public void floodFill(@Nonnull BlockPattern pattern, int radius, int startX, int startY, int startZ, ComponentAccessor<EntityStore> componentAccessor)
      Flood fills the connected open space around a start cell with a block pattern.

      Spreads outward from (startX, startY, startZ) through empty cells via 6-neighbor (face) connectivity, stamping the pattern into each and stopping at solid blocks, unloaded chunks, and any cell farther than radius from the start (spherical bound). The start cell must be empty. Bails out if the open volume exceeds MAX_FLOOD_CELLS so an unbounded outdoor area cannot stall the world thread.

      Parameters:
      pattern - the block pattern to fill with
      radius - the maximum distance (in blocks) to spread from the start cell
      startX - world x of the start cell
      startY - world y of the start cell
      startZ - world z of the start cell
      componentAccessor - the component accessor
    • replace

      public void replace(@Nonnull Ref<EntityStore> ref, @Nonnull Material from, @Nonnull Material to, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Replaces materials (blocks or fluids) in the selection.

      Handles all replacement cases uniformly:

      • fluid → fluid: replaces matching fluid with new fluid
      • fluid → block: clears fluid and places block
      • fluid → empty: clears fluid
      • block → block: replaces matching block with new block
      • block → fluid: clears block and places fluid
      • block → empty: clears block and any fluid
      Parameters:
      ref - the entity reference
      from - the material to replace (block or fluid)
      to - the material to replace with
      componentAccessor - the component accessor
    • replace

      public void replace(@Nonnull Ref<EntityStore> ref, @Nullable BlockMask fromMask, @Nonnull BlockPattern toPattern, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • replace

      public int replace(@Nonnull Ref<EntityStore> ref, @Nonnull it.unimi.dsi.fastutil.ints.Int2IntFunction function, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • move

      public void move(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3i direction, boolean empty, boolean entities, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • shift

      public void shift(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3i direction, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • pos1

      public void pos1(@Nonnull org.joml.Vector3i pos1, ComponentAccessor<EntityStore> componentAccessor)
    • pos2

      public void pos2(@Nonnull org.joml.Vector3i pos2, ComponentAccessor<EntityStore> componentAccessor)
    • select

      public void select(@Nonnull org.joml.Vector3i pos1, @Nonnull org.joml.Vector3i pos2, @Nullable String reason, ComponentAccessor<EntityStore> componentAccessor)
    • syncSelection

      public void syncSelection(@Nonnull org.joml.Vector3i pos1, @Nonnull org.joml.Vector3i pos2, ComponentAccessor<EntityStore> componentAccessor)
      Re-aligns the server selection with one the client has already applied and drawn. This records no undo entry and sends no feedback, because the player did not perform it and can already see it.
    • deselect

      public void deselect(ComponentAccessor<EntityStore> componentAccessor)
    • stack

      public void stack(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3i direction, int count, boolean empty, int spacing, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • extrudeSelectionFace

      public void extrudeSelectionFace(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3i direction, int depth, int spacing, boolean empty, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Pulls every origin in the current selection outward depth times along direction, reusing extrudeAlongFace(SectionAccessor, Int3OpenHashSet, int, int, int, int, int, int, int, int, boolean, BlockPattern, BlockSelection, BlockSelection) with the selection's span along the normal as the stride so each copy tiles the whole selection instead of advancing a single cell. Backs the /stack command; spacing adds extra empty cells between consecutive copies.
    • extrudeFaceSlice

      public void extrudeFaceSlice(@Nonnull org.joml.Vector3i faceMin, @Nonnull org.joml.Vector3i faceMax, @Nonnull org.joml.Vector3i direction, int depth, int spacing, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      TODO: This looks to not be called from anywhere currently, so see if this needs to be removed. Extrudes the face slice that the selection tool dragged from. The slice is one cell deep along direction, so every copy advances one cell. The selection is only the source of the slice, so it keeps its own bounds and does not follow the copies.
    • expand

      public void expand(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3i direction, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • contract

      public void contract(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3i direction, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • shrink

      public void shrink(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • repairFillers

      public void repairFillers(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • undoRegion

      @Nonnull public CompletableFuture<Void> undoRegion(@Nonnull World world, @Nonnull PrefetchLease lease, int count)
      The area the next count entries of the undo history restore into.
    • redoRegion

      @Nonnull public CompletableFuture<Void> redoRegion(@Nonnull World world, @Nonnull PrefetchLease lease, int count)
      The area the next count entries of the redo history restore into.
    • undo

      @Nonnull public List<BuilderToolsPlugin.ActionEntry> undo(@Nonnull Ref<EntityStore> ref, int count, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • redo

      @Nonnull public List<BuilderToolsPlugin.ActionEntry> redo(@Nonnull Ref<EntityStore> ref, int count, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • save

      public void save(@Nonnull Ref<EntityStore> ref, @Nonnull String name, boolean relativize, boolean overwrite, @Nonnull SupportMode supportMode, @Nullable AssetPack targetPack, @Nonnull PrefabFormat format, ComponentAccessor<EntityStore> componentAccessor)
    • saveFromSelection

      public void saveFromSelection(@Nonnull Ref<EntityStore> ref, @Nonnull String name, boolean relativize, boolean overwrite, boolean includeEntities, boolean includeEmpty, @Nullable org.joml.Vector3i playerAnchor, @Nonnull SupportMode supportMode, @Nullable AssetPack targetPack, @Nonnull PrefabFormat format, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • load

      public void load(@Nonnull String name, @Nonnull BlockSelection serverPrefab, ComponentAccessor<EntityStore> componentAccessor)
    • clearHistory

      public void clearHistory(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • setGlobalMask

      public void setGlobalMask(@Nullable BlockMask mask, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • sendArea

      public void sendArea()
    • pushHistory

      public void pushHistory(@Nonnull UndoAction action, @Nonnull SelectionSnapshot<?> snapshot)
    • pushHistory

      public void pushHistory(@Nonnull UndoAction action, @Nonnull List<SelectionSnapshot<?>> snapshots)
    • handleEntityTransform

      public void handleEntityTransform(@Nonnull Ref<EntityStore> targetRef, boolean hasTransformData, boolean isSessionEnd, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Handles an entity transform change from the entity tool. On the first packet with actual transform data, captures the original position as a pending snapshot. Subsequent transforms for the same entity simply update the live state without creating new snapshots. A bare session-end (no transform data) only commits existing pending sessions without creating new ones.
    • commitPendingEntityTransformSession

      public void commitPendingEntityTransformSession()
      Commits the pending entity transform session to history (if any).
    • pushEntityCloneHistory

      public void pushEntityCloneHistory(@Nonnull Ref<EntityStore> clonedEntityRef)
      Records a clone operation to the undo history. Does not commit any pending transform/scale session -- the entity may still be held, and those sessions will commit when the user releases it.
    • pushEntityRemoveHistory

      public void pushEntityRemoveHistory(@Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Records a remove operation to the undo history. If the entity was being held (pending transform session), restores it to its original position before snapshotting so that undoing the delete returns the entity to where it was picked up from, not where it was being held.
    • pushEntityFreezeHistory

      public void pushEntityFreezeHistory(@Nonnull EntityFreezeSnapshot snapshot)
      Records a freeze/unfreeze operation to the undo history.
    • pushEntitySettingsHistory

      public void pushEntitySettingsHistory(@Nonnull EntitySettingsSnapshot snapshot)
      Records an entity settings change (light, pickup, collision) to the undo history.
    • pushTriggerVolumeHistory

      public void pushTriggerVolumeHistory(@Nonnull SelectionSnapshot<?> snapshot)
    • pushTriggerVolumeHistory

      public void pushTriggerVolumeHistory(@Nonnull List<SelectionSnapshot<?>> snapshots)
    • pushPointHistory

      public void pushPointHistory(@Nonnull SelectionSnapshot<?> snapshot)
    • pushPointHistory

      public void pushPointHistory(@Nonnull List<SelectionSnapshot<?>> snapshots)
    • handleEntityScale

      public void handleEntityScale(@Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Records a scale operation using appendable grouping. On the first scale change for an entity, captures the original scale as a pending snapshot. Subsequent scale changes for the same entity are absorbed (the pending snapshot already holds the original scale). When a different action occurs, the pending snapshot is committed.

      Does not commit a pending transform session -- both can coexist while the user is simultaneously holding and scaling an entity, and will be committed together at session end.