Package baritone.api.cache
Interface IWorldScanner
public interface IWorldScanner
- Since:
- 10/6/2018
- Author:
- Brady
-
Method Summary
Modifier and TypeMethodDescriptionintrepack(IPlayerContext ctx) intrepack(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- TheIPlayerContextcontaining player and world info that the scan is based uponfilter- The blocks to scan formax- The maximum number of blocks to scan before cutoffyLevelThreshold- 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- TheIPlayerContextcontaining player and world info that the scan is based uponfilter- The blocks to scan forpos- The position of the target chunkmax- The maximum number of blocks to scan before cutoffyLevelThreshold- 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- TheIPlayerContextcontaining player and world info that the scan is based uponblocks- The blocks to scan forpos- The position of the target chunkmax- The maximum number of blocks to scan before cutoffyLevelThreshold- 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
- Parameters:
ctx- The player, describing the origin- Returns:
- The amount of chunks successfully queued for repacking
-
repack
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 originrange- The range to repack- Returns:
- The amount of chunks successfully queued for repacking
-