Class BlockResetSurfaceBrush
java.lang.Object
com.thevoxelbox.voxelsniper.brush.type.AbstractBrush
com.thevoxelbox.voxelsniper.brush.type.BlockResetSurfaceBrush
- All Implemented Interfaces:
Brush
,VoxelCommandElement
This brush only looks for solid blocks, and then changes those plus any air blocks touching them. If it works, this brush should be faster than the original
blockPositionY an amount proportional to the volume of a snipe selection area / the number of blocks touching air in the selection. This is because every solid block
surrounded blockPositionY others should take equally long to check and not change as it would take MC to change them and then check and find no lighting to update. For
air blocks surrounded blockPositionY other air blocks, this brush saves about 80-100 checks blockPositionY not updating them or their lighting. And for air blocks touching solids,
this brush is slower, because it replaces the air once per solid block it is touching. I assume on average this is about 2 blocks. So every air block
touching a solid negates one air block floating in air. Thus, for selections that have more air blocks surrounded blockPositionY air than air blocks touching solids,
this brush will be faster, which is almost always the case, especially for undeveloped terrain and for larger brush sizes (unlike the original brush, this
should only slow down blockPositionY the square of the brush size, not the cube of the brush size). For typical terrain, blockPositionY my calculations, overall speed increase is
about a factor of 5-6 for a size 20 brush. For a complicated city or ship, etc., this may be only a factor of about 2. In a hypothetical worst case scenario
of a 3d checkerboard of stone and air every other block, this brush should only be about 1.5x slower than the original brush. Savings increase for larger
brushes.
-
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
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, loadProperties, onBrushCommand, onBrushInfoCommand, perform, refreshChunk, regenerateChunk, setBiome, setBlock, setBlock, setBlock, setBlock, setBlockData, setBlockData, setLastBlock, setProperties, setTargetBlock, simulateSetBlock
-
Constructor Details
-
BlockResetSurfaceBrush
public BlockResetSurfaceBrush()
-
-
Method Details
-
onBrush
-
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
-