Class FilterBlock
java.lang.Object
com.sk89q.worldedit.math.BlockVector3
com.fastasyncworldedit.core.extent.filter.block.FilterBlock
- All Implemented Interfaces:
TileEntityBlock
,Extent
,InputExtent
,OutputExtent
,NbtValued
- Direct Known Subclasses:
AbstractExtentFilterBlock
,AbstractFilterBlock
,AbstractSingleFilterBlock
A class representing a block with a position
- Used for optimized block operations to avoid lookups
-
Field Summary
Fields inherited from class com.sk89q.worldedit.math.BlockVector3
ONE, UNIT_MINUS_X, UNIT_MINUS_Y, UNIT_MINUS_Z, UNIT_X, UNIT_Y, UNIT_Z, ZERO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBiome
(BlockVector3 position) Get the biome at the given location.abstract BlockState
getBlock()
getBlock
(int x, int y, int z) getBlockRelativeY
(int y) int
int
abstract Extent
abstract BaseBlock
getFullBlock
(int x, int y, int z) getFullBlock
(Extent orDefault) int
int
int
Get the maximum point in the extent.Get the minimum point in the extent.abstract CompoundTag
Get the object's NBT data (tile entity data).getNbtData
(Extent orDefault) abstract int
int
getOrdinal
(Extent orDefault) getOrdinalBelow
(Extent orDefault) getStateAbove
(Extent orDefault) getStateRelativeY
(Extent orDefault, int y) abstract int
getX()
Get the X coordinate.abstract int
getY()
Get the Y coordinate.abstract int
getZ()
Get the Z coordinate.boolean
Returns whether the block contains NBT data.boolean
setBiome
(BlockVector3 position, BiomeType biome) Set the biome.void
boolean
setBlock
(Extent orDefault, BlockState state) abstract void
setBlock
(BlockState state) boolean
setFullBlock
(Extent orDefault, BaseBlock block) abstract void
setFullBlock
(BaseBlock block) abstract void
setNbtData
(CompoundTag nbtData) Set the object's NBT data (tile entity data).abstract void
setOrdinal
(int ordinal) boolean
setOrdinal
(Extent orDefault, int ordinal) boolean
setTile
(int x, int y, int z, CompoundTag tile) Methods inherited from class com.sk89q.worldedit.math.BlockVector3
abs, add, add, add, at, at, ceil, checkLongPackable, clampY, containedWithin, cross, distance, distanceSq, divide, divide, divide, dot, equals, equals, floor, fromLongPackedForm, getBlockX, getBlockY, getBlockZ, getMaximum, getMinimum, getOrdinalChar, hashCode, isLongPackable, length, lengthSq, multiply, multiply, multiply, multiply, mutX, mutX, mutY, mutY, mutZ, mutZ, normalize, plus, round, setComponents, setComponents, shl, shl, shr, shr, sortByCoordsYzx, subtract, subtract, subtract, toBlockVector2, toImmutable, toLongPackedForm, toParserString, toPitch, toString, toVector3, toYaw, transform2D, withX, withY, withZ
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.extent.Extent
addCaves, addOre, addOres, addPostProcessor, addProcessor, addSchems, apply, apply, cancel, center, commit, contains, contains, countBlocks, countBlocks, createEntity, disableHistory, disableQueue, enableHistory, enableQueue, generate, getBlockDistribution, getBlockDistributionWithData, getEntities, getEntities, getHighestTerrainBlock, getHighestTerrainBlock, getMaxY, getMinY, getNearestSurfaceLayer, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, isQueueEnabled, isWorld, lazyCopy, regenerateChunk, relight, relightBlock, relightSky, removeEntity, replaceBlocks, replaceBlocks, replaceBlocks, setBlocks, setBlocks, setBlocks, spawnResource
Methods inherited from interface com.sk89q.worldedit.extent.InputExtent
getBiome, getBiomeType, getBlock, getBrightness, getBrightness, getEmittedLight, getEmittedLight, getFullBlock, getHeightMap, getOpacity, getOpacity, getSkyLight, getSkyLight
Methods inherited from interface com.sk89q.worldedit.world.NbtValued
getNbt, getNbtReference, setNbt, setNbtReference
Methods inherited from interface com.sk89q.worldedit.extent.OutputExtent
fullySupports3DBiomes, setBiome, setBiome, setBlock, setBlock, setBlockLight, setBlockLight, setHeightMap, setSkyLight, setSkyLight
Methods inherited from interface com.sk89q.worldedit.blocks.TileEntityBlock
getNbtId
-
Constructor Details
-
FilterBlock
public FilterBlock()
-
-
Method Details
-
getExtent
-
setBiome
-
getOrdinal
public abstract int getOrdinal() -
setOrdinal
public abstract void setOrdinal(int ordinal) -
getBlock
-
setBlock
-
getFullBlock
-
setFullBlock
-
getNbtData
Description copied from interface:NbtValued
Get the object's NBT data (tile entity data). The returned tag, if modified in any way, should be sent toNbtValued.setNbtData(CompoundTag)
so that the instance knows of the changes. Making changes without callingNbtValued.setNbtData(CompoundTag)
could have unintended consequences.NbtValued.hasNbtData()
must return true if and only if method does not return null.- Specified by:
getNbtData
in interfaceNbtValued
- Returns:
- compound tag, or null
-
setNbtData
Description copied from interface:NbtValued
Set the object's NBT data (tile entity data).- Specified by:
setNbtData
in interfaceNbtValued
- Parameters:
nbtData
- NBT data, or null if no data
-
hasNbtData
public boolean hasNbtData()Description copied from interface:NbtValued
Returns whether the block contains NBT data.NbtValued.getNbtData()
must not return null if this method returns true.- Specified by:
hasNbtData
in interfaceNbtValued
- Returns:
- true if there is NBT data
-
getMinimumPoint
Description copied from interface:Extent
Get the minimum point in the extent.If the extent is unbounded, then a large (negative) value may be returned.
- Specified by:
getMinimumPoint
in interfaceExtent
- Returns:
- the minimum point
-
getMaximumPoint
Description copied from interface:Extent
Get the maximum point in the extent.If the extent is unbounded, then a large (positive) value may be returned.
- Specified by:
getMaximumPoint
in interfaceExtent
- Returns:
- the maximum point
-
getBlock
- Specified by:
getBlock
in interfaceInputExtent
-
setTile
- Specified by:
setTile
in interfaceOutputExtent
- Throws:
WorldEditException
-
getFullBlock
- Specified by:
getFullBlock
in interfaceInputExtent
-
getBlockBelow
-
getBlockAbove
-
getBlockNorth
-
getBlockEast
-
getBlockSouth
-
getBlockWest
-
getBlockRelativeY
-
getX
public abstract int getX()Description copied from class:BlockVector3
Get the X coordinate.- Specified by:
getX
in classBlockVector3
- Returns:
- the x coordinate
-
getY
public abstract int getY()Description copied from class:BlockVector3
Get the Y coordinate.- Specified by:
getY
in classBlockVector3
- Returns:
- the y coordinate
-
getZ
public abstract int getZ()Description copied from class:BlockVector3
Get the Z coordinate.- Specified by:
getZ
in classBlockVector3
- Returns:
- the z coordinate
-
getLocalX
public int getLocalX() -
getLocalY
public int getLocalY() -
getLocalZ
public int getLocalZ() -
getChunkX
public int getChunkX() -
getChunkZ
public int getChunkZ() -
setOrdinal
- Overrides:
setOrdinal
in classBlockVector3
-
setBlock
- Overrides:
setBlock
in classBlockVector3
-
setFullBlock
- Overrides:
setFullBlock
in classBlockVector3
-
getOrdinal
- Overrides:
getOrdinal
in classBlockVector3
-
getBlock
- Overrides:
getBlock
in classBlockVector3
-
getFullBlock
- Overrides:
getFullBlock
in classBlockVector3
-
getNbtData
- Overrides:
getNbtData
in classBlockVector3
-
getOrdinalBelow
- Overrides:
getOrdinalBelow
in classBlockVector3
-
getStateAbove
- Overrides:
getStateAbove
in classBlockVector3
-
getStateRelativeY
- Overrides:
getStateRelativeY
in classBlockVector3
-
getBiome
Description copied from interface:InputExtent
Get the biome at the given location.If there is no biome available, then the ocean biome should be returned.
As implementation varies per Minecraft version, this may not exactly get this positions biome. On versions prior to 1.15, this will get the entire column. On later versions it will get the 4x4x4 cube's biome.
- Specified by:
getBiome
in interfaceInputExtent
- Parameters:
position
- the (x, y, z) location to check the biome at- Returns:
- the biome at the location
- See Also:
-
setBiome
Description copied from interface:OutputExtent
Set the biome.As implementation varies per Minecraft version, this may set more than this position's biome. On versions prior to 1.15, this will set the entire column. On later versions it will set the 4x4x4 cube.
- Specified by:
setBiome
in interfaceOutputExtent
- Parameters:
position
- the (x, y, z) location to set the biome atbiome
- the biome to set to- Returns:
- true if the biome was successfully set (return value may not be accurate)
-