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

public abstract class FilterBlock extends BlockVector3 implements Extent, TileEntityBlock
A class representing a block with a position - Used for optimized block operations to avoid lookups
  • Constructor Details

    • FilterBlock

      public FilterBlock()
  • Method Details

    • getExtent

      public abstract Extent getExtent()
    • setBiome

      public void setBiome(BiomeType biome)
    • getOrdinal

      public abstract int getOrdinal()
    • setOrdinal

      public abstract void setOrdinal(int ordinal)
    • getBlock

      public abstract BlockState getBlock()
    • setBlock

      public abstract void setBlock(BlockState state)
    • getFullBlock

      public abstract BaseBlock getFullBlock()
    • setFullBlock

      public abstract void setFullBlock(BaseBlock block)
    • getNbtData

      public abstract CompoundTag 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 to NbtValued.setNbtData(CompoundTag) so that the instance knows of the changes. Making changes without calling NbtValued.setNbtData(CompoundTag) could have unintended consequences.

      NbtValued.hasNbtData() must return true if and only if method does not return null.

      Specified by:
      getNbtData in interface NbtValued
      Returns:
      compound tag, or null
    • setNbtData

      public abstract void setNbtData(@Nullable CompoundTag nbtData)
      Description copied from interface: NbtValued
      Set the object's NBT data (tile entity data).
      Specified by:
      setNbtData in interface NbtValued
      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 interface NbtValued
      Returns:
      true if there is NBT data
    • getMinimumPoint

      public BlockVector3 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 interface Extent
      Returns:
      the minimum point
    • getMaximumPoint

      public BlockVector3 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 interface Extent
      Returns:
      the maximum point
    • getBlock

      public BlockState getBlock(int x, int y, int z)
      Specified by:
      getBlock in interface InputExtent
    • setTile

      public boolean setTile(int x, int y, int z, CompoundTag tile) throws WorldEditException
      Specified by:
      setTile in interface OutputExtent
      Throws:
      WorldEditException
    • getFullBlock

      public BaseBlock getFullBlock(int x, int y, int z)
      Specified by:
      getFullBlock in interface InputExtent
    • getBlockBelow

      public BlockState getBlockBelow()
    • getBlockAbove

      public BlockState getBlockAbove()
    • getBlockNorth

      public BlockState getBlockNorth()
    • getBlockEast

      public BlockState getBlockEast()
    • getBlockSouth

      public BlockState getBlockSouth()
    • getBlockWest

      public BlockState getBlockWest()
    • getBlockRelativeY

      public BlockState getBlockRelativeY(int y)
    • getX

      public abstract int getX()
      Description copied from class: BlockVector3
      Get the X coordinate.
      Specified by:
      getX in class BlockVector3
      Returns:
      the x coordinate
    • getY

      public abstract int getY()
      Description copied from class: BlockVector3
      Get the Y coordinate.
      Specified by:
      getY in class BlockVector3
      Returns:
      the y coordinate
    • getZ

      public abstract int getZ()
      Description copied from class: BlockVector3
      Get the Z coordinate.
      Specified by:
      getZ in class BlockVector3
      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

      public boolean setOrdinal(Extent orDefault, int ordinal)
      Overrides:
      setOrdinal in class BlockVector3
    • setBlock

      public boolean setBlock(Extent orDefault, BlockState state)
      Overrides:
      setBlock in class BlockVector3
    • setFullBlock

      public boolean setFullBlock(Extent orDefault, BaseBlock block)
      Overrides:
      setFullBlock in class BlockVector3
    • getOrdinal

      public int getOrdinal(Extent orDefault)
      Overrides:
      getOrdinal in class BlockVector3
    • getBlock

      public BlockState getBlock(Extent orDefault)
      Overrides:
      getBlock in class BlockVector3
    • getFullBlock

      public BaseBlock getFullBlock(Extent orDefault)
      Overrides:
      getFullBlock in class BlockVector3
    • getNbtData

      public CompoundTag getNbtData(Extent orDefault)
      Overrides:
      getNbtData in class BlockVector3
    • getOrdinalBelow

      public BlockState getOrdinalBelow(Extent orDefault)
      Overrides:
      getOrdinalBelow in class BlockVector3
    • getStateAbove

      public BlockState getStateAbove(Extent orDefault)
      Overrides:
      getStateAbove in class BlockVector3
    • getStateRelativeY

      public BlockState getStateRelativeY(Extent orDefault, int y)
      Overrides:
      getStateRelativeY in class BlockVector3
    • getBiome

      @Nullable public BiomeType getBiome(BlockVector3 position)
      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 interface InputExtent
      Parameters:
      position - the (x, y, z) location to check the biome at
      Returns:
      the biome at the location
      See Also:
    • setBiome

      public boolean setBiome(BlockVector3 position, BiomeType biome)
      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 interface OutputExtent
      Parameters:
      position - the (x, y, z) location to set the biome at
      biome - the biome to set to
      Returns:
      true if the biome was successfully set (return value may not be accurate)