Class StencilBrush
java.lang.Object
com.thevoxelbox.voxelsniper.brush.type.AbstractBrush
com.thevoxelbox.voxelsniper.brush.type.stencil.StencilBrush
- All Implemented Interfaces:
Brush
,VoxelCommandElement
This is paste only currently. Assumes files exist, and thus has no usefulness until I add in saving stencils later. Uses sniper-exclusive stencil format: 3
shorts for X,Z,Y size of cuboid 3 shorts for X,Z,Y offsets from the -X,-Z,-Y corner. This is the reference point for pasting, corresponding to where you
click your brush. 1 long integer saying how many runs of blocks are in the schematic (data is compressed into runs) 1 per run: (1 boolean: true = compressed
line ahead, false = locally unique block ahead. This wastes a bit instead of a byte, and overall saves space, as long as at least 1/8 of all RUNS are going
to be size 1, which in Minecraft is almost definitely true. IF boolean was true, next unstenciled byte stores the number of consecutive blocks of the same type,
up to 256. IF boolean was false, there is no byte here, goes straight to ID and data instead, which applies to just one block. 2 bytes to identify type of
block. First byte is ID, second is data. This applies to every one of the line of consecutive blocks if boolean was true.)
-
Field Summary
Fields inherited from class com.thevoxelbox.voxelsniper.brush.type.AbstractBrush
CHUNK_SIZE, CONFIG, DECIMAL_FORMAT, PLUGIN, PLUGIN_DATA_FOLDER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleArrowAction
(Snipe snipe) The arrow action.void
handleGunpowderAction
(Snipe snipe) The gunpowder action.void
Load brush properties.void
void
onBrushFill
(@NotNull Snipe snipe, @NotNull File stencil) void
onBrushFull
(@NotNull Snipe snipe, @NotNull File stencil) void
onBrushInfo
(@NotNull Snipe snipe) void
onBrushReplace
(@NotNull Snipe snipe, @NotNull File stencil) void
onBrushStencil
(@NotNull Snipe snipe, @NotNull File stencil) void
Send brush information.Methods inherited from class com.thevoxelbox.voxelsniper.brush.type.AbstractBrush
clampY, clampY, clampY, createEntity, generateTree, getBlock, getBlock, getBlockType, getBlockType, getBooleanProperty, getDirection, getDoubleProperty, getEditSession, getEnumProperty, getFullBlock, getFullBlock, getHighestTerrainBlock, getIntegerProperty, getLastBlock, getListProperty, getProperties, getProperty, getProperty, getRegistryProperty, getRelativeBlock, getRelativeBlock, getStringProperty, getTargetBlock, onBrushCommand, onBrushInfoCommand, perform, refreshChunk, regenerateChunk, setBiome, setBlock, setBlock, setBlock, setBlock, setBlockData, setBlockData, setLastBlock, setProperties, setTargetBlock, simulateSetBlock
-
Constructor Details
-
StencilBrush
public StencilBrush()
-
-
Method Details
-
loadProperties
public void loadProperties()Description copied from interface:Brush
Load brush properties.- Specified by:
loadProperties
in interfaceBrush
- Overrides:
loadProperties
in classAbstractBrush
-
onBrush
-
onBrushInfo
-
onBrushFull
-
onBrushFill
-
onBrushReplace
-
onBrushStencil
-
handleArrowAction
Description copied from interface:Brush
The arrow action. Executed when a player right clicks with an arrow- Parameters:
snipe
- Snipe
-
handleGunpowderAction
Description copied from interface:Brush
The gunpowder action. Executed when a player right clicks with gunpowder- Parameters:
snipe
- Snipe
-
sendInfo
Description copied from interface:Brush
Send brush information.- Parameters:
snipe
- Snipe
-