Class BuilderToolsPlugin.BuilderState
java.lang.Object
com.hypixel.hytale.builtin.buildertools.BuilderToolsPlugin.BuilderState
- Enclosing class:
BuilderToolsPlugin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate UUIDprivate BlockMaskprivate Playerprivate PlayerRefprivate Pathprivate Pathprivate Stringprivate Randomprivate final it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.ActionEntry> private BlockSelectionprivate static final MetricsRegistry<BuilderToolsPlugin.BuilderState> private CompletableFuture<Void> private final StampedLockprivate final it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.QueuedTask> private longprivate final it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.ActionEntry> private final StampedLockprivate final BuilderToolsUserData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Throwable>
voidaddToQueue(ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task) intclear(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, ComponentAccessor<EntityStore> componentAccessor) private voidclearFillerBlocksIfNeeded(int baseX, int baseY, int baseZ, int oldBlockId, int rotationIndex, LocalCachedChunkAccessor accessor, BlockSelection before, BlockSelection after) voidclearHistory(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) <T extends Throwable>
voidvoidcontract(Ref<EntityStore> ref, 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) createShapePredicate(BrushShape shape, float halfWidth, float halfHeight, float innerHalfWidth, float innerHalfHeight, boolean hollow) voiddeselect(ComponentAccessor<EntityStore> componentAccessor) 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, 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, Vector3i direction, ComponentAccessor<EntityStore> componentAccessor) voidextendFace(int x, int y, int z, int normalX, int normalY, int normalZ, int extrudeDepth, int radiusAllowed, int blockId, Vector3i min, Vector3i max, ComponentAccessor<EntityStore> componentAccessor) private voidextendFaceFindBlocks(ChunkAccessor accessor, BlockTypeAssetMap<String, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType> assetMap, BlockSelection before, BlockSelection after, int x, int y, int z, int normalX, int normalY, int normalZ, int extrudeDepth, int blockId, Vector3i min, Vector3i max) voidfill(BlockPattern pattern, 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) getBlocksSampleData(ChunkAccessor accessor, int x, int y, int z, int radius) getBlocksSmoothData(ChunkAccessor accessor, int x, int y, int z) intintintprivate BuilderToolsPlugin.ActionEntryhistoryAction(Ref<EntityStore> ref, it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.ActionEntry> from, it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.ActionEntry> to, ComponentAccessor<EntityStore> componentAccessor) voidhollow(Ref<EntityStore> ref, int blockId, int thickness, boolean setTop, boolean setBottom, ComponentAccessor<EntityStore> componentAccessor) booleanisAsideAir(ChunkAccessor accessor, int x, int y, int z) booleanisAsideBlock(ChunkAccessor accessor, int x, int y, int z) private booleanisFloodPossible(ChunkAccessor accessor, long blockPosition, Vector3i min, Vector3i max, int blockId, int targetBlockId) voidload(String name, ComponentAccessor<EntityStore> componentAccessor) voidload(String name, BlockSelection serverPrefab, ComponentAccessor<EntityStore> componentAccessor) private voidmarkPrefabsDirtyFromSnapshots(List<SelectionSnapshot<?>> snapshots) voidmove(Ref<EntityStore> ref, Vector3i direction, boolean empty, boolean entities, 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(Vector3i pos1, ComponentAccessor<EntityStore> componentAccessor) voidpos2(Vector3i pos2, ComponentAccessor<EntityStore> componentAccessor) private voidpushHistory(BuilderToolsPlugin.Action action, SelectionSnapshot<?> snapshot) private voidpushHistory(BuilderToolsPlugin.Action action, List<SelectionSnapshot<?>> snapshots) redo(Ref<EntityStore> ref, int count, ComponentAccessor<EntityStore> componentAccessor) private voidrelease()voidrepairFillers(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidreplace(Ref<EntityStore> ref, Material from, Material to, ComponentAccessor<EntityStore> componentAccessor) voidreplace(Ref<EntityStore> ref, it.unimi.dsi.fastutil.ints.Int2IntFunction function, ComponentAccessor<EntityStore> componentAccessor) voidreplace(Ref<EntityStore> ref, IntPredicate doReplace, int[] toBlockIds, ComponentAccessor<EntityStore> componentAccessor) voidreplace(Ref<EntityStore> ref, IntPredicate doReplace, int to, ComponentAccessor<EntityStore> componentAccessor) private voidreplaceMultiBlockStructure(int baseX, int baseY, int baseZ, int oldBlockId, int newBlockId, int rotationIndex, LocalCachedChunkAccessor accessor, BlockSelection before, BlockSelection after) private voidvoidrotate(Ref<EntityStore> ref, Axis axis, int angle, ComponentAccessor<EntityStore> componentAccessor) voidrotate(Ref<EntityStore> ref, Axis axis, int angle, Vector3f originOfRotation, ComponentAccessor<EntityStore> componentAccessor) voidrotateArbitrary(Ref<EntityStore> ref, float yaw, float pitch, float roll, ComponentAccessor<EntityStore> componentAccessor) voidrunTask()voidsave(Ref<EntityStore> ref, String name, boolean relativize, boolean overwrite, ComponentAccessor<EntityStore> componentAccessor) voidsaveFromSelection(Ref<EntityStore> ref, String name, boolean relativize, boolean overwrite, boolean includeEntities, boolean includeEmpty, ComponentAccessor<EntityStore> componentAccessor) voidselect(Vector3i pos1, Vector3i pos2, String reason, ComponentAccessor<EntityStore> componentAccessor) voidsendArea()private voidsendErrorFeedback(Ref<EntityStore> ref, Message message, ComponentAccessor<EntityStore> componentAccessor) private voidsendFeedback(Ref<EntityStore> ref, Message message, String sound, ComponentAccessor<EntityStore> componentAccessor) private voidsendFeedback(Ref<EntityStore> ref, Message message, String sound, NotificationStyle notificationStyle, ComponentAccessor<EntityStore> componentAccessor) private voidsendFeedback(Message message, ComponentAccessor<EntityStore> componentAccessor) private voidsendFeedback(Message message, NotificationStyle notificationStyle, ComponentAccessor<EntityStore> componentAccessor) private voidsendFeedback(String key, int total, int num, ComponentAccessor<EntityStore> componentAccessor) private voidsendFeedback(String key, int total, ComponentAccessor<EntityStore> componentAccessor) voidprivate voidvoidset(int blockId, ComponentAccessor<EntityStore> componentAccessor) voidset(BlockPattern pattern, ComponentAccessor<EntityStore> componentAccessor) voidsetActivePrefabPath(UUID path) voidsetGlobalMask(BlockMask mask, ComponentAccessor<EntityStore> componentAccessor) voidsetPrefabListPath(Path prefabListPath) voidsetPrefabListRoot(Path prefabListRoot) voidsetPrefabListSearchQuery(String prefabListSearchQuery) voidsetSelection(BlockSelection selection) voidshift(Ref<EntityStore> ref, Vector3i direction, ComponentAccessor<EntityStore> componentAccessor) voidstack(Ref<EntityStore> ref, Vector3i direction, int count, boolean empty, int spacing, ComponentAccessor<EntityStore> componentAccessor) voidtint(int x, int y, int z, int color, BrushShape shape, int shapeRange, ComponentAccessor<EntityStore> componentAccessor) voidtint(Ref<EntityStore> ref, int color, ComponentAccessor<EntityStore> componentAccessor) transformBlockLocation(Vector3i blockLocation, Matrix4d transformationMatrix, Vector3f rotationOrigin) static RotationTupletransformRotation(RotationTuple prevRot, Matrix4d transformationMatrix) voidtransformSelectionPoints(Matrix4d transformationMatrix, Vector3f rotationOrigin) voidtransformThenPasteClipboard(BlockChange[] blockChanges, PrototypePlayerBuilderToolSettings.FluidChange[] fluidChanges, Matrix4d transformationMatrix, Vector3f rotationOrigin, Vector3i initialPastePoint, ComponentAccessor<EntityStore> componentAccessor) undo(Ref<EntityStore> ref, int count, ComponentAccessor<EntityStore> componentAccessor) voidupdate(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax) voidwalls(Ref<EntityStore> ref, int blockId, int thickness, boolean cappedTop, boolean cappedBottom, ComponentAccessor<EntityStore> componentAccessor) voidwalls(Ref<EntityStore> ref, BlockPattern pattern, int thickness, boolean cappedTop, boolean cappedBottom, ComponentAccessor<EntityStore> componentAccessor)
-
Field Details
-
STATE_METRICS_REGISTRY
-
player
-
playerRef
-
userData
-
undoLock
-
undo
private final it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.ActionEntry> undo -
redo
private final it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.ActionEntry> redo -
taskLock
-
tasks
private final it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.QueuedTask> tasks -
taskFuture
-
timestamp
private volatile long timestamp -
selection
-
globalMask
-
random
-
activePrefabPath
-
prefabListRoot
-
prefabListPath
-
prefabListSearchQuery
-
-
Constructor Details
-
BuilderState
-
-
Method Details
-
release
private void release() -
retain
-
addToQueue
public <T extends Throwable> void addToQueue(@Nonnull ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task) -
computeSelectionCopy
public <T extends Throwable> void computeSelectionCopy(@Nonnull ThrowableConsumer<BlockSelection, T> task) -
runTask
public void runTask() -
getTaskCount
public int getTaskCount() -
getUndoCount
public int getUndoCount() -
getRedoCount
public int getRedoCount() -
getDisplayName
-
getUserData
-
getTaskFuture
-
getSelection
-
getGlobalMask
-
getRandom
-
setSelection
-
sendSelectionToClient
public void sendSelectionToClient() -
sendErrorFeedback
private void sendErrorFeedback(@Nonnull Ref<EntityStore> ref, @Nonnull Message message, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
sendFeedback
private void sendFeedback(@Nonnull Ref<EntityStore> ref, @Nonnull Message message, @Nullable String sound, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
sendFeedback
private void sendFeedback(@Nonnull Ref<EntityStore> ref, @Nonnull Message message, @Nullable String sound, @Nonnull NotificationStyle notificationStyle, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
sendFeedback
private void sendFeedback(@Nonnull Message message, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
sendFeedback
private void sendFeedback(@Nonnull Message message, @Nonnull NotificationStyle notificationStyle, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
sendFeedback
private void sendFeedback(@Nonnull String key, int total, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
sendFeedback
private void sendFeedback(@Nonnull String key, int total, int num, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
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) -
isFloodPossible
private boolean isFloodPossible(@Nonnull ChunkAccessor accessor, long blockPosition, @Nonnull Vector3i min, @Nonnull Vector3i max, int blockId, int targetBlockId) -
isAsideAir
-
isAsideBlock
-
getBlocksSampleData
@Nonnull public BuilderToolsPlugin.BuilderState.BlocksSampleData getBlocksSampleData(@Nonnull ChunkAccessor accessor, int x, int y, int z, int radius) -
getBlocksSmoothData
@Nonnull public BuilderToolsPlugin.BuilderState.SmoothSampleData getBlocksSmoothData(@Nonnull ChunkAccessor 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, ComponentAccessor<EntityStore> componentAccessor) -
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) -
createShapePredicate
private Predicate<Vector3i> createShapePredicate(BrushShape shape, float halfWidth, float halfHeight, float innerHalfWidth, float innerHalfHeight, boolean hollow) -
extendFace
public void extendFace(int x, int y, int z, int normalX, int normalY, int normalZ, int extrudeDepth, int radiusAllowed, int blockId, @Nullable Vector3i min, @Nullable Vector3i max, ComponentAccessor<EntityStore> componentAccessor) -
extendFaceFindBlocks
private void extendFaceFindBlocks(@Nonnull ChunkAccessor accessor, @Nonnull BlockTypeAssetMap<String, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType> assetMap, @Nonnull BlockSelection before, @Nonnull BlockSelection after, int x, int y, int z, int normalX, int normalY, int normalZ, int extrudeDepth, int blockId, @Nonnull Vector3i min, @Nonnull Vector3i max) -
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) -
tint
public void tint(int x, int y, int z, int color, @Nonnull BrushShape shape, int shapeRange, 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
-
clear
public int clear(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
transformRotation
-
transformThenPasteClipboard
public void transformThenPasteClipboard(@Nonnull BlockChange[] blockChanges, @Nullable PrototypePlayerBuilderToolSettings.FluidChange[] fluidChanges, @Nonnull Matrix4d transformationMatrix, @Nonnull Vector3f rotationOrigin, @Nonnull Vector3i initialPastePoint, ComponentAccessor<EntityStore> componentAccessor) -
transformSelectionPoints
-
transformBlockLocation
-
paste
public int paste(@Nonnull Ref<EntityStore> ref, int x, int y, int z, @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 Vector3f originOfRotation, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
rotateArbitrary
public void rotateArbitrary(@Nonnull Ref<EntityStore> ref, float yaw, float pitch, float roll, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
flip
public void flip(@Nonnull Ref<EntityStore> ref, @Nonnull Axis axis, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
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, int blockId, int thickness, boolean cappedTop, boolean cappedBottom, @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) -
set
-
set
-
fill
-
replace
public void replace(@Nonnull Ref<EntityStore> ref, @Nonnull Material from, @Nonnull Material to, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
clearFillerBlocksIfNeeded
private void clearFillerBlocksIfNeeded(int baseX, int baseY, int baseZ, int oldBlockId, int rotationIndex, LocalCachedChunkAccessor accessor, BlockSelection before, BlockSelection after) -
replaceMultiBlockStructure
private void replaceMultiBlockStructure(int baseX, int baseY, int baseZ, int oldBlockId, int newBlockId, int rotationIndex, LocalCachedChunkAccessor accessor, BlockSelection before, BlockSelection after) -
replace
public void replace(@Nonnull Ref<EntityStore> ref, @Nullable IntPredicate doReplace, int to, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
replace
public void replace(@Nonnull Ref<EntityStore> ref, @Nullable IntPredicate doReplace, @Nonnull int[] toBlockIds, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
replace
public void 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 Vector3i direction, boolean empty, boolean entities, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
shift
public void shift(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3i direction, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
pos1
-
pos2
-
select
public void select(@Nonnull Vector3i pos1, @Nonnull Vector3i pos2, @Nullable String reason, ComponentAccessor<EntityStore> componentAccessor) -
deselect
-
stack
public void stack(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3i direction, int count, boolean empty, int spacing, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
expand
public void expand(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3i direction, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
contract
public void contract(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3i direction, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
repairFillers
public void repairFillers(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
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, ComponentAccessor<EntityStore> componentAccessor) -
saveFromSelection
public void saveFromSelection(@Nonnull Ref<EntityStore> ref, @Nonnull String name, boolean relativize, boolean overwrite, boolean includeEntities, boolean includeEmpty, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
load
-
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) -
sendUpdate
private void sendUpdate() -
sendArea
public void sendArea() -
pushHistory
-
pushHistory
-
markPrefabsDirtyFromSnapshots
-
historyAction
@Nullable private BuilderToolsPlugin.ActionEntry historyAction(Ref<EntityStore> ref, @Nonnull it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.ActionEntry> from, @Nonnull it.unimi.dsi.fastutil.objects.ObjectArrayFIFOQueue<BuilderToolsPlugin.ActionEntry> to, ComponentAccessor<EntityStore> componentAccessor)
-