Class SanitizerExtent
java.lang.Object
com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard
de.eldoria.schematicsanitizer.sanitizer.SanitizerExtent
- All Implemented Interfaces:
com.sk89q.worldedit.extent.clipboard.Clipboard,com.sk89q.worldedit.extent.Extent,com.sk89q.worldedit.extent.InputExtent,com.sk89q.worldedit.extent.OutputExtent,Closeable,Flushable,AutoCloseable,Iterable<com.sk89q.worldedit.math.BlockVector3>
public class SanitizerExtent
extends com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard
An extent which filters the set blocks based on the provided
Settings.
It is recommended to use a ForwardExtentCopy to write into it.
SanitizerExtent sanitizerExtent = new SanitizerExtent(path, clipboard, settings); ForwardExtentCopy copy = new ForwardExtentCopy(clipboard, clipboard.getRegion(), sanitizerExtent, clipboard.getMinimumPoint()); Operations.completeBlindly(copy);
The extent will then remove any data.
A report about the removed data can be retrieved with report()
What the extent will do:
- remove creature entities once the
ContentLimit.creatures()limit is reached - remove non creature entities once the
ContentLimit.nonCreatures()limit is reached - remove invalid nbt tags from blocks as defined in
Filter.nbtBlacklist() - remove invalid nbt tags with content from blocks as defined in
Filter.textBlacklist() - remove invalid nbt tags from entities as defined in
Filter.nbtBlacklist() - remove invalid nbt tags with content from entities as defined in
Filter.textBlacklist() - remove blocks when they are contained in
BlockFilter.materialBlacklist() - remove entities when they are contained in
EntityFilter.entityBlacklist() - remove entities if they are a creature and
EntityFilter.removeCreature()is true - remove entities if they are not a creature and
EntityFilter.removeNonCreatures()is true
What the extent won't do:
- remove blocks once the
ContentLimit.blocks()limit is reached - remove blocks once the
ContentLimit.nonAirBlocks()limit is reached
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard
com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard.ClipboardEntity -
Constructor Summary
ConstructorsConstructorDescriptionSanitizerExtent(Path path, com.sk89q.worldedit.extent.clipboard.Clipboard base, Settings settings) Creates a new extent -
Method Summary
Modifier and TypeMethodDescription@Nullable com.sk89q.worldedit.entity.EntitycreateEntity(com.sk89q.worldedit.util.Location location, com.sk89q.worldedit.entity.BaseEntity entity) @Nullable com.sk89q.worldedit.entity.EntitycreateEntity(com.sk89q.worldedit.util.Location location, com.sk89q.worldedit.entity.BaseEntity entity, UUID uuid) report()<B extends com.sk89q.worldedit.world.block.BlockStateHolder<B>>
booleansetBlock(int x, int y, int z, B block) <T extends com.sk89q.worldedit.world.block.BlockStateHolder<T>>
booleansetBlock(com.sk89q.worldedit.math.BlockVector3 position, T block) <B extends com.sk89q.worldedit.world.block.BlockStateHolder<B>>
intsetBlocks(com.sk89q.worldedit.regions.Region region, B block) intsetBlocks(com.sk89q.worldedit.regions.Region region, com.sk89q.worldedit.function.pattern.Pattern pattern) intsetBlocks(Set<com.sk89q.worldedit.math.BlockVector3> vset, com.sk89q.worldedit.function.pattern.Pattern pattern) booleansetTile(int x, int y, int z, com.sk89q.jnbt.CompoundTag tag) Methods inherited from class com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard
close, flush, getBiome, getBiomeType, getBlock, getBlock, getDimensions, getEntities, getEntities, getFullBlock, getFullBlock, getMaximumPoint, getMinimumPoint, getOrigin, getParent, getRegion, hasBiomes, iterator, iterator, iterator2d, removeEntity, removeEntity, setBiome, setBiome, setOrigin, setTileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sk89q.worldedit.extent.clipboard.Clipboard
apply, getArea, getHeight, getLength, getURI, getVolume, getWidth, paste, paste, paste, paste, paste, paste, save, save, transformMethods inherited from interface com.sk89q.worldedit.extent.Extent
addCaves, addOre, addOres, addPostProcessor, addProcessor, addSchems, apply, cancel, center, commit, contains, contains, countBlocks, countBlocks, disableHistory, disableQueue, enableHistory, enableQueue, generate, getBlockDistribution, getBlockDistributionWithData, getHighestTerrainBlock, getHighestTerrainBlock, getMaxY, getMinY, getNearestSurfaceLayer, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, isQueueEnabled, isWorld, lazyCopy, regenerateChunk, relight, relightBlock, relightSky, replaceBlocks, replaceBlocks, replaceBlocks, spawnResourceMethods inherited from interface com.sk89q.worldedit.extent.InputExtent
getBiome, getBrightness, getBrightness, getEmittedLight, getEmittedLight, getHeightMap, getOpacity, getOpacity, getSkyLight, getSkyLightMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.sk89q.worldedit.extent.OutputExtent
fullySupports3DBiomes, setBiome, setBlockLight, setBlockLight, setHeightMap, setSkyLight, setSkyLight
-
Constructor Details
-
Method Details
-
report
-
report
-
setTile
public boolean setTile(int x, int y, int z, com.sk89q.jnbt.CompoundTag tag) - Specified by:
setTilein interfacecom.sk89q.worldedit.extent.OutputExtent- Overrides:
setTilein classcom.sk89q.worldedit.extent.clipboard.BlockArrayClipboard
-
setBlock
public <B extends com.sk89q.worldedit.world.block.BlockStateHolder<B>> boolean setBlock(int x, int y, int z, B block) - Specified by:
setBlockin interfacecom.sk89q.worldedit.extent.OutputExtent- Overrides:
setBlockin classcom.sk89q.worldedit.extent.clipboard.BlockArrayClipboard
-
createEntity
@Nullable public @Nullable com.sk89q.worldedit.entity.Entity createEntity(com.sk89q.worldedit.util.Location location, com.sk89q.worldedit.entity.BaseEntity entity) - Specified by:
createEntityin interfacecom.sk89q.worldedit.extent.Extent- Overrides:
createEntityin classcom.sk89q.worldedit.extent.clipboard.BlockArrayClipboard
-
createEntity
@Nullable public @Nullable com.sk89q.worldedit.entity.Entity createEntity(com.sk89q.worldedit.util.Location location, com.sk89q.worldedit.entity.BaseEntity entity, UUID uuid) - Specified by:
createEntityin interfacecom.sk89q.worldedit.extent.Extent- Overrides:
createEntityin classcom.sk89q.worldedit.extent.clipboard.BlockArrayClipboard
-
setBlocks
public <B extends com.sk89q.worldedit.world.block.BlockStateHolder<B>> int setBlocks(com.sk89q.worldedit.regions.Region region, B block) throws com.sk89q.worldedit.MaxChangedBlocksException - Throws:
com.sk89q.worldedit.MaxChangedBlocksException
-
setBlocks
public int setBlocks(com.sk89q.worldedit.regions.Region region, com.sk89q.worldedit.function.pattern.Pattern pattern) throws com.sk89q.worldedit.MaxChangedBlocksException - Throws:
com.sk89q.worldedit.MaxChangedBlocksException
-
setBlocks
public int setBlocks(Set<com.sk89q.worldedit.math.BlockVector3> vset, com.sk89q.worldedit.function.pattern.Pattern pattern) -
setBlock
public <T extends com.sk89q.worldedit.world.block.BlockStateHolder<T>> boolean setBlock(com.sk89q.worldedit.math.BlockVector3 position, T block) throws com.sk89q.worldedit.WorldEditException - Specified by:
setBlockin interfacecom.sk89q.worldedit.extent.OutputExtent- Overrides:
setBlockin classcom.sk89q.worldedit.extent.clipboard.BlockArrayClipboard- Throws:
com.sk89q.worldedit.WorldEditException
-