- Description
- Nested Class Summary
- Method Summary
- Method Details
- syncRawPositions()
- addToQueue(ThrowableTriConsumer)
- addToQueue(long, ThrowableTriConsumer)
- addToQueue(long, BuilderToolsPlugin.TaskRegion, ThrowableTriConsumer)
- selectionRegion(World, Vector3ic, PrefetchLease)
- selectionExtrudeRegion(World, Vector3ic, int, int, PrefetchLease)
- computeSelectionCopy(ThrowableConsumer)
- discardQueuedTasks()
- runTask()
- getTaskCount()
- getUndoCount()
- getRedoCount()
- getDisplayName()
- getUserData()
- getTaskFuture()
- getSelection()
- prefetchBudget()
- getGlobalMask()
- getRandom()
- setSelection(BlockSelection)
- setSkipNextPreviewRebuild(boolean)
- sendSelectionToClient()
- setActivePrefabPath(UUID)
- getActivePrefabPath()
- getPrefabListRoot()
- setPrefabListRoot(Path)
- getPrefabListPath()
- setPrefabListPath(Path)
- getPrefabListSearchQuery()
- setPrefabListSearchQuery(String)
- edit(Ref, BuilderToolOnUseInteraction, ComponentAccessor)
- placeBrushConfig(Ref, long, BrushConfigEditStore, ComponentAccessor)
- flood(EditOperation, int, int, int, int, int, BlockPattern, int)
- isAsideAir(BlockReader, int, int, int)
- isAsideBlock(BlockReader, int, int, int)
- getBlocksSampleData(BlockReader, int, int, int, int)
- getBlocksSmoothData(BlockReader, int, int, int)
- editLine(int, int, int, int, int, int, BlockPattern, int, int, int, BrushShape, BrushOrigin, int, int, BlockMask, ComponentAccessor)
- extendOrShrinkFace(int, int, int, int, int, int, int, int, int, boolean, BlockPattern, String, String, int, boolean, ComponentAccessor)
- fillVolume(int, int, int, int, int, int, int, int, int, BlockPattern, int, boolean, ComponentAccessor)
- applyRecoloring(int, int, int, int, int, BlockPattern, boolean, BrushShape, int, boolean, BlockColorIndex, ComponentAccessor)
- applyGradient(int, int, int, int, int, int, int, int, int, int, int, List, String, float, BrushShape, boolean, int, boolean, ComponentAccessor)
- applyShading(int, int, int, float, float, float, int, int, boolean, boolean, boolean, BuilderToolsPlugin.ShadingLight, int[], float, BrushShape, boolean, float, int, boolean, BlockColorIndex, ComponentAccessor)
- update(int, int, int, int, int, int)
- tint(Ref, int, ComponentAccessor)
- environment(Ref, int, ComponentAccessor)
- copyOrCut(Ref, int, int, int, int, int, int, int, ComponentAccessor)
- copyOrCut(Ref, int, int, int, int, int, int, int, Vector3i, ComponentAccessor)
- copyOrCut(Ref, int, int, int, int, int, int, int, Vector3i, Set, ComponentAccessor)
- copyOrCut(Ref, int, int, int, int, int, int, int, Vector3i, Set, List, ComponentAccessor)
- clear(int, int, int, int, int, int, ComponentAccessor)
- transformRotation(RotationTuple, Quaterniond)
- transformThenPasteClipboard(BlockChange[], PrototypePlayerBuilderToolSettings.FluidChange[], PrototypePlayerBuilderToolSettings.EntityChange[], Holder[], Quaterniond, Vector3i, Rotation3f, Vector3i, boolean, PrototypePlayerBuilderToolSettings, List, ComponentAccessor)
- transformSelectionPoints(Quaterniond, Vector3i, Rotation3f)
- transformBlockLocation(Vector3i, Quaterniond, Vector3i, Rotation3f)
- layer(int, int, int, List, int, Vector3ic, SectionAccessor, BlockSelection, BlockSelection)
- layer(List, Vector3ic, ComponentAccessor)
- paste(Ref, int, int, int, ComponentAccessor)
- paste(Ref, int, int, int, boolean, ComponentAccessor)
- clipboardRegion(World, int, int, int, PrefetchLease)
- paste(Ref, int, int, int, boolean, boolean, ComponentAccessor)
- rotate(Ref, Axis, int, ComponentAccessor)
- rotate(Ref, Axis, int, RotateBlockMode, ComponentAccessor)
- resetClipboardRotation(Ref, ComponentAccessor)
- rotateArbitrary(Ref, float, float, float, ComponentAccessor)
- flip(Ref, Axis, ComponentAccessor)
- applyRandomizeTransforms(Ref, int, int, int, boolean, boolean, boolean, RotateBlockMode, ComponentAccessor)
- hollow(Ref, int, int, boolean, boolean, ComponentAccessor)
- walls(Ref, BlockPattern, int, boolean, boolean, ComponentAccessor)
- selectionExceedsEditLimit(ComponentAccessor)
- set(BlockPattern, ComponentAccessor)
- submerge(BlockPattern, ComponentAccessor)
- unsubmerge(Ref, ComponentAccessor)
- fill(BlockPattern, ComponentAccessor)
- floodFill(BlockPattern, int, int, int, int, ComponentAccessor)
- replace(Ref, Material, Material, ComponentAccessor)
- replace(Ref, BlockMask, BlockPattern, ComponentAccessor)
- replace(Ref, Int2IntFunction, ComponentAccessor)
- move(Ref, Vector3i, boolean, boolean, ComponentAccessor)
- shift(Ref, Vector3i, ComponentAccessor)
- pos1(Vector3i, ComponentAccessor)
- pos2(Vector3i, ComponentAccessor)
- select(Vector3i, Vector3i, String, ComponentAccessor)
- syncSelection(Vector3i, Vector3i, ComponentAccessor)
- deselect(ComponentAccessor)
- stack(Ref, Vector3i, int, boolean, int, ComponentAccessor)
- extrudeSelectionFace(Ref, Vector3i, int, int, boolean, ComponentAccessor)
- extrudeFaceSlice(Vector3i, Vector3i, Vector3i, int, int, ComponentAccessor)
- expand(Ref, Vector3i, ComponentAccessor)
- contract(Ref, Vector3i, ComponentAccessor)
- shrink(Ref, ComponentAccessor)
- repairFillers(Ref, ComponentAccessor)
- undoRegion(World, PrefetchLease, int)
- redoRegion(World, PrefetchLease, int)
- undo(Ref, int, ComponentAccessor)
- redo(Ref, int, ComponentAccessor)
- save(Ref, String, boolean, boolean, SupportMode, AssetPack, PrefabFormat, ComponentAccessor)
- saveFromSelection(Ref, String, boolean, boolean, boolean, boolean, Vector3i, SupportMode, AssetPack, PrefabFormat, ComponentAccessor)
- load(String, BlockSelection, ComponentAccessor)
- clearHistory(Ref, ComponentAccessor)
- setGlobalMask(BlockMask, ComponentAccessor)
- sendArea()
- pushHistory(UndoAction, SelectionSnapshot)
- pushHistory(UndoAction, List)
- handleEntityTransform(Ref, boolean, boolean, ComponentAccessor)
- commitPendingEntityTransformSession()
- pushEntityCloneHistory(Ref)
- pushEntityRemoveHistory(Ref, ComponentAccessor)
- pushEntityFreezeHistory(EntityFreezeSnapshot)
- pushEntitySettingsHistory(EntitySettingsSnapshot)
- pushTriggerVolumeHistory(SelectionSnapshot)
- pushTriggerVolumeHistory(List)
- pushPointHistory(SelectionSnapshot)
- pushPointHistory(List)
- handleEntityScale(Ref, ComponentAccessor)
Class BuilderToolsPlugin.BuilderState
- Enclosing class:
BuilderToolsPlugin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescription<T extends Throwable>
voidaddToQueue(long estimatedBlockChanges, BuilderToolsPlugin.TaskRegion region, ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task) <T extends Throwable>
voidaddToQueue(long estimatedBlockChanges, ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task) <T extends Throwable>
voidaddToQueue(ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task) voidapplyGradient(int targetX, int targetY, int targetZ, int width, int height, int startX, int startY, int startZ, int endX, int endY, int endZ, List<BuilderToolsPlugin.ColorGradientMaterial> materials, String shape, float blendBand, BrushShape brushShape, boolean invert, int undoGroupSize, boolean isHoldDown, ComponentAccessor<EntityStore> componentAccessor) voidapplyRandomizeTransforms(Ref<EntityStore> ref, int deltaX, int deltaY, int deltaZ, boolean flipX, boolean flipY, boolean flipZ, RotateBlockMode rotateBlockMode, ComponentAccessor<EntityStore> componentAccessor) Applies a batch of rotations and/or flips as a single undo entry.voidapplyRecoloring(int targetX, int targetY, int targetZ, int width, int height, BlockPattern replacementPattern, boolean smartMatch, BrushShape brushShape, int undoGroupSize, boolean isHoldDown, BlockColorIndex blockColorIndex, ComponentAccessor<EntityStore> componentAccessor) voidapplyShading(int targetX, int targetY, int targetZ, float playerX, float playerY, float playerZ, int width, int height, boolean lighten, boolean autoMode, boolean falloffFromTarget, BuilderToolsPlugin.ShadingLight lightSource, int[] customRamp, float intensity, BrushShape brushShape, boolean invert, float edgeBlend, int undoGroupSize, boolean isHoldDown, BlockColorIndex blockColorIndex, ComponentAccessor<EntityStore> componentAccessor) intclear(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, ComponentAccessor<EntityStore> componentAccessor) voidclearHistory(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) clipboardRegion(World world, int x, int y, int z, PrefetchLease lease) The area the clipboard covers when it is pasted at the position.voidCommits the pending entity transform session to history (if any).<T extends Throwable>
voidvoidcontract(Ref<EntityStore> ref, org.joml.Vector3i direction, ComponentAccessor<EntityStore> componentAccessor) intcopyOrCut(Ref<EntityStore> ref, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int settings, ComponentAccessor<EntityStore> componentAccessor) intcopyOrCut(Ref<EntityStore> ref, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int settings, org.joml.Vector3i playerAnchor, ComponentAccessor<EntityStore> componentAccessor) intcopyOrCut(Ref<EntityStore> ref, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int settings, org.joml.Vector3i playerAnchor, Set<Ref<EntityStore>> skipEntityRemoveSnapshotFor, ComponentAccessor<EntityStore> componentAccessor) intcopyOrCut(Ref<EntityStore> ref, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int settings, org.joml.Vector3i playerAnchor, Set<Ref<EntityStore>> skipEntityRemoveSnapshotFor, List<SelectionSnapshot<?>> pickupSnapshots, ComponentAccessor<EntityStore> componentAccessor) voiddeselect(ComponentAccessor<EntityStore> componentAccessor) voidDrops every queued task and lets go of the chunks their areas loaded.intedit(Ref<EntityStore> ref, BuilderToolOnUseInteraction packet, ComponentAccessor<EntityStore> componentAccessor) voideditLine(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, BlockMask mask, ComponentAccessor<EntityStore> componentAccessor) voidenvironment(Ref<EntityStore> ref, int environmentId, ComponentAccessor<EntityStore> componentAccessor) voidexpand(Ref<EntityStore> ref, org.joml.Vector3i direction, ComponentAccessor<EntityStore> componentAccessor) voidextendOrShrinkFace(int x, int y, int z, int normalX, int normalY, int normalZ, int depth, int extrudeWidth, int extrudeLength, boolean shrink, BlockPattern pattern, String filterMode, String strategy, int undoGroupSize, boolean isHoldDown, ComponentAccessor<EntityStore> componentAccessor) voidextrudeFaceSlice(org.joml.Vector3i faceMin, org.joml.Vector3i faceMax, org.joml.Vector3i direction, int depth, int spacing, ComponentAccessor<EntityStore> componentAccessor) TODO: This looks to not be called from anywhere currently, so see if this needs to be removed.voidextrudeSelectionFace(Ref<EntityStore> ref, org.joml.Vector3i direction, int depth, int spacing, boolean empty, ComponentAccessor<EntityStore> componentAccessor) Pulls every origin in the current selection outwarddepthtimes alongdirection, reusingextrudeAlongFace(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.voidfill(BlockPattern pattern, ComponentAccessor<EntityStore> componentAccessor) Fills empty spaces in the selection with a block pattern.voidfillVolume(int x, int y, int z, int normalX, int normalY, int normalZ, int fillDepth, int fillWidth, int fillHeight, BlockPattern pattern, int undoGroupSize, boolean isHoldDown, ComponentAccessor<EntityStore> componentAccessor) voidflip(Ref<EntityStore> ref, Axis axis, ComponentAccessor<EntityStore> componentAccessor) voidflood(EditOperation editOperation, int x, int y, int z, int shapeWidth, int shapeHeight, BlockPattern pattern, int targetBlockId) voidfloodFill(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.getBlocksSampleData(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 typegetBlocksSmoothData(BlockReader accessor, int x, int y, int z) intintintvoidhandleEntityScale(Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) Records a scale operation using appendable grouping.voidhandleEntityTransform(Ref<EntityStore> targetRef, boolean hasTransformData, boolean isSessionEnd, ComponentAccessor<EntityStore> componentAccessor) Handles an entity transform change from the entity tool.voidhollow(Ref<EntityStore> ref, int blockId, int thickness, boolean setTop, boolean setBottom, ComponentAccessor<EntityStore> componentAccessor) booleanisAsideAir(BlockReader accessor, int x, int y, int z) booleanisAsideBlock(BlockReader accessor, int x, int y, int z) voidlayer(int x, int y, int z, List<it.unimi.dsi.fastutil.Pair<Integer, String>> layers, int depth, org.joml.Vector3ic direction, SectionAccessor accessor, BlockSelection before, BlockSelection after) Applies layering to at a single block location.voidlayer(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.voidload(String name, BlockSelection serverPrefab, ComponentAccessor<EntityStore> componentAccessor) voidmove(Ref<EntityStore> ref, org.joml.Vector3i direction, boolean empty, boolean entities, ComponentAccessor<EntityStore> componentAccessor) intpaste(Ref<EntityStore> ref, int x, int y, int z, boolean technicalPaste, boolean skipAirBlocks, ComponentAccessor<EntityStore> componentAccessor) intpaste(Ref<EntityStore> ref, int x, int y, int z, boolean technicalPaste, ComponentAccessor<EntityStore> componentAccessor) intpaste(Ref<EntityStore> ref, int x, int y, int z, ComponentAccessor<EntityStore> componentAccessor) voidplaceBrushConfig(Ref<EntityStore> ref, long startTime, BrushConfigEditStore brushConfigEditStore, ComponentAccessor<EntityStore> componentAccessor) voidpos1(org.joml.Vector3i pos1, ComponentAccessor<EntityStore> componentAccessor) voidpos2(org.joml.Vector3i pos2, ComponentAccessor<EntityStore> componentAccessor) How much a load this state asks for may bring in.voidpushEntityCloneHistory(Ref<EntityStore> clonedEntityRef) Records a clone operation to the undo history.voidpushEntityFreezeHistory(EntityFreezeSnapshot snapshot) Records a freeze/unfreeze operation to the undo history.voidpushEntityRemoveHistory(Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) Records a remove operation to the undo history.voidRecords an entity settings change (light, pickup, collision) to the undo history.voidpushHistory(UndoAction action, SelectionSnapshot<?> snapshot) voidpushHistory(UndoAction action, List<SelectionSnapshot<?>> snapshots) voidpushPointHistory(SelectionSnapshot<?> snapshot) voidpushPointHistory(List<SelectionSnapshot<?>> snapshots) voidpushTriggerVolumeHistory(SelectionSnapshot<?> snapshot) voidpushTriggerVolumeHistory(List<SelectionSnapshot<?>> snapshots) redo(Ref<EntityStore> ref, int count, ComponentAccessor<EntityStore> componentAccessor) redoRegion(World world, PrefetchLease lease, int count) The area the nextcountentries of the redo history restore into.voidrepairFillers(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidreplace(Ref<EntityStore> ref, Material from, Material to, ComponentAccessor<EntityStore> componentAccessor) Replaces materials (blocks or fluids) in the selection.voidreplace(Ref<EntityStore> ref, BlockMask fromMask, BlockPattern toPattern, ComponentAccessor<EntityStore> componentAccessor) intreplace(Ref<EntityStore> ref, it.unimi.dsi.fastutil.ints.Int2IntFunction function, ComponentAccessor<EntityStore> componentAccessor) voidresetClipboardRotation(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidrotate(Ref<EntityStore> ref, Axis axis, int angle, ComponentAccessor<EntityStore> componentAccessor) voidrotate(Ref<EntityStore> ref, Axis axis, int angle, RotateBlockMode rotateBlockMode, ComponentAccessor<EntityStore> componentAccessor) voidrotateArbitrary(Ref<EntityStore> ref, float yaw, float pitch, float roll, ComponentAccessor<EntityStore> componentAccessor) Rotates the selection by arbitrary yaw, pitch, and roll angles.voidrunTask()voidsave(Ref<EntityStore> ref, String name, boolean relativize, boolean overwrite, SupportMode supportMode, AssetPack targetPack, PrefabFormat format, ComponentAccessor<EntityStore> componentAccessor) voidsaveFromSelection(Ref<EntityStore> ref, String name, boolean relativize, boolean overwrite, boolean includeEntities, boolean includeEmpty, org.joml.Vector3i playerAnchor, SupportMode supportMode, AssetPack targetPack, PrefabFormat format, ComponentAccessor<EntityStore> componentAccessor) voidselect(org.joml.Vector3i pos1, org.joml.Vector3i pos2, String reason, ComponentAccessor<EntityStore> componentAccessor) booleanselectionExceedsEditLimit(ComponentAccessor<EntityStore> componentAccessor) selectionExtrudeRegion(World world, org.joml.Vector3ic direction, int depth, int spacing, PrefetchLease lease) The area the current selection covers, together with where an extrude of it copies to.selectionRegion(World world, org.joml.Vector3ic offset, PrefetchLease lease) The area the current selection covers, together with where an edit moves it to.voidsendArea()voidSends the current selection (clipboard) to the client.voidset(BlockPattern pattern, ComponentAccessor<EntityStore> componentAccessor) Sets a block pattern in the selection.voidsetActivePrefabPath(UUID path) voidsetGlobalMask(BlockMask mask, ComponentAccessor<EntityStore> componentAccessor) voidsetPrefabListPath(Path prefabListPath) voidsetPrefabListRoot(Path prefabListRoot) voidsetPrefabListSearchQuery(String prefabListSearchQuery) voidsetSelection(BlockSelection selection) voidsetSkipNextPreviewRebuild(boolean skip) voidshift(Ref<EntityStore> ref, org.joml.Vector3i direction, ComponentAccessor<EntityStore> componentAccessor) voidshrink(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidstack(Ref<EntityStore> ref, org.joml.Vector3i direction, int count, boolean empty, int spacing, ComponentAccessor<EntityStore> componentAccessor) voidsubmerge(BlockPattern pattern, ComponentAccessor<EntityStore> componentAccessor) voidvoidsyncSelection(org.joml.Vector3i pos1, org.joml.Vector3i pos2, ComponentAccessor<EntityStore> componentAccessor) Re-aligns the server selection with one the client has already applied and drawn.voidtint(Ref<EntityStore> ref, int color, ComponentAccessor<EntityStore> componentAccessor) org.joml.Vector3itransformBlockLocation(org.joml.Vector3i blockLocation, org.joml.Quaterniond rotation, org.joml.Vector3i translationOffset, Rotation3f rotationOrigin) static RotationTupletransformRotation(RotationTuple prevRot, org.joml.Quaterniond rotation) Transforms a block rotation through a quaternion rotation.voidtransformSelectionPoints(org.joml.Quaterniond rotation, org.joml.Vector3i translationOffset, Rotation3f rotationOrigin) voidtransformThenPasteClipboard(BlockChange[] blockChanges, PrototypePlayerBuilderToolSettings.FluidChange[] fluidChanges, PrototypePlayerBuilderToolSettings.EntityChange[] entityChanges, Holder<ChunkStore>[] blockHolders, org.joml.Quaterniond rotation, org.joml.Vector3i translationOffset, Rotation3f rotationOrigin, org.joml.Vector3i initialPastePoint, boolean keepEmptyBlocks, PrototypePlayerBuilderToolSettings prototypeSettings, List<SelectionSnapshot<?>> extraSnapshots, ComponentAccessor<EntityStore> componentAccessor) undo(Ref<EntityStore> ref, int count, ComponentAccessor<EntityStore> componentAccessor) undoRegion(World world, PrefetchLease lease, int count) The area the nextcountentries of the undo history restore into.voidunsubmerge(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidupdate(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax) voidwalls(Ref<EntityStore> ref, BlockPattern pattern, int thickness, boolean cappedTop, boolean cappedBottom, ComponentAccessor<EntityStore> componentAccessor) Sets walls of the selection with a block pattern.
-
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
-
getUserData
-
getTaskFuture
-
getSelection
-
prefetchBudget
How much a load this state asks for may bring in. SeePrefetch.Budget. -
getGlobalMask
-
getRandom
-
setSelection
-
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
-
getActivePrefabPath
-
getPrefabListRoot
-
setPrefabListRoot
-
getPrefabListPath
-
setPrefabListPath
-
getPrefabListSearchQuery
-
setPrefabListSearchQuery
-
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
-
isAsideBlock
-
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
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 blocky- The y coordinate of the blockz- The z coordinate of the blocklayers- 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 referenceyaw- 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 callingrotate(Ref, Axis, int, ComponentAccessor)andflip(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 referencepattern- the block pattern (can include weights and rotations)thickness- the wall thicknesscappedTop- whether to cap the topcappedBottom- whether to cap the bottomcomponentAccessor- the component accessor
-
selectionExceedsEditLimit
-
set
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
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 withcomponentAccessor- 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 thanradiusfrom the start (spherical bound). The start cell must be empty. Bails out if the open volume exceedsMAX_FLOOD_CELLSso an unbounded outdoor area cannot stall the world thread.- Parameters:
pattern- the block pattern to fill withradius- the maximum distance (in blocks) to spread from the start cellstartX- world x of the start cellstartY- world y of the start cellstartZ- world z of the start cellcomponentAccessor- 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 referencefrom- the material to replace (block or fluid)to- the material to replace withcomponentAccessor- 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
-
pos2
-
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
-
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 outwarddepthtimes alongdirection, reusingextrudeAlongFace(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/stackcommand;spacingadds 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 alongdirection, 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 nextcountentries of the undo history restore into. -
redoRegion
@Nonnull public CompletableFuture<Void> redoRegion(@Nonnull World world, @Nonnull PrefetchLease lease, int count) The area the nextcountentries 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
-
pushHistory
-
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
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
Records a freeze/unfreeze operation to the undo history. -
pushEntitySettingsHistory
Records an entity settings change (light, pickup, collision) to the undo history. -
pushTriggerVolumeHistory
-
pushTriggerVolumeHistory
-
pushPointHistory
-
pushPointHistory
-
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.
-