Interface IWorldScanner


public interface IWorldScanner
Since:
10/6/2018
Author:
Brady
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Overload of repack(IPlayerContext, int) where the value of the range parameter is 40.
    int
    repack(IPlayerContext ctx, int range)
    Queues the chunks in a square formation around the specified player, using the specified range, which represents 1/2 the square's dimensions, where the player is in the center.
    List<net.minecraft.core.BlockPos>
    scanChunk(IPlayerContext ctx, BlockOptionalMetaLookup filter, net.minecraft.world.level.ChunkPos pos, int max, int yLevelThreshold)
    Scans a single chunk for the specified blocks.
    default List<net.minecraft.core.BlockPos>
    scanChunk(IPlayerContext ctx, List<net.minecraft.world.level.block.Block> blocks, net.minecraft.world.level.ChunkPos pos, int max, int yLevelThreshold)
    Scans a single chunk for the specified blocks.
    List<net.minecraft.core.BlockPos>
    scanChunkRadius(IPlayerContext ctx, BlockOptionalMetaLookup filter, int max, int yLevelThreshold, int maxSearchRadius)
    Scans the world, up to the specified max chunk radius, for the specified blocks.
    default List<net.minecraft.core.BlockPos>
    scanChunkRadius(IPlayerContext ctx, List<net.minecraft.world.level.block.Block> filter, int max, int yLevelThreshold, int maxSearchRadius)
     
  • Method Details

    • scanChunkRadius

      List<net.minecraft.core.BlockPos> scanChunkRadius(IPlayerContext ctx, BlockOptionalMetaLookup filter, int max, int yLevelThreshold, int maxSearchRadius)
      Scans the world, up to the specified max chunk radius, for the specified blocks.
      Parameters:
      ctx - The IPlayerContext containing player and world info that the scan is based upon
      filter - The blocks to scan for
      max - The maximum number of blocks to scan before cutoff
      yLevelThreshold - If a block is found within this Y level, the current result will be returned, if the value is negative, then this condition doesn't apply.
      maxSearchRadius - The maximum chunk search radius
      Returns:
      The matching block positions
    • scanChunkRadius

      default List<net.minecraft.core.BlockPos> scanChunkRadius(IPlayerContext ctx, List<net.minecraft.world.level.block.Block> filter, int max, int yLevelThreshold, int maxSearchRadius)
    • scanChunk

      List<net.minecraft.core.BlockPos> scanChunk(IPlayerContext ctx, BlockOptionalMetaLookup filter, net.minecraft.world.level.ChunkPos pos, int max, int yLevelThreshold)
      Scans a single chunk for the specified blocks.
      Parameters:
      ctx - The IPlayerContext containing player and world info that the scan is based upon
      filter - The blocks to scan for
      pos - The position of the target chunk
      max - The maximum number of blocks to scan before cutoff
      yLevelThreshold - If a block is found within this Y level, the current result will be returned, if the value is negative, then this condition doesn't apply.
      Returns:
      The matching block positions
    • scanChunk

      default List<net.minecraft.core.BlockPos> scanChunk(IPlayerContext ctx, List<net.minecraft.world.level.block.Block> blocks, net.minecraft.world.level.ChunkPos pos, int max, int yLevelThreshold)
      Scans a single chunk for the specified blocks.
      Parameters:
      ctx - The IPlayerContext containing player and world info that the scan is based upon
      blocks - The blocks to scan for
      pos - The position of the target chunk
      max - The maximum number of blocks to scan before cutoff
      yLevelThreshold - If a block is found within this Y level, the current result will be returned, if the value is negative, then this condition doesn't apply.
      Returns:
      The matching block positions
    • repack

      Overload of repack(IPlayerContext, int) where the value of the range parameter is 40.
      Parameters:
      ctx - The player, describing the origin
      Returns:
      The amount of chunks successfully queued for repacking
    • repack

      int repack(IPlayerContext ctx, int range)
      Queues the chunks in a square formation around the specified player, using the specified range, which represents 1/2 the square's dimensions, where the player is in the center.
      Parameters:
      ctx - The player, describing the origin
      range - The range to repack
      Returns:
      The amount of chunks successfully queued for repacking