public class BlockPattern extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
BlockPattern.BlockStateCacheLoader |
static class |
BlockPattern.Result |
Modifier and Type | Field and Description |
---|---|
private int |
depth |
private int |
height |
private Predicate<CachedBlockPosition>[][][] |
pattern |
private int |
width |
Constructor and Description |
---|
BlockPattern(Predicate<CachedBlockPosition>[][][] pattern) |
Modifier and Type | Method and Description |
---|---|
int |
getDepth() |
int |
getHeight() |
int |
getWidth() |
static LoadingCache<BlockPos,CachedBlockPosition> |
makeCache(WorldView world,
boolean forceLoad) |
BlockPattern.Result |
searchAround(WorldView world,
BlockPos pos) |
private BlockPattern.Result |
testTransform(BlockPos frontTopLeft,
Direction forwards,
Direction up,
LoadingCache<BlockPos,CachedBlockPosition> cache) |
protected static BlockPos |
translate(BlockPos pos,
Direction forwards,
Direction up,
int offsetLeft,
int offsetDown,
int offsetForwards) |
private final Predicate<CachedBlockPosition>[][][] pattern
private final int depth
private final int height
private final int width
public BlockPattern(Predicate<CachedBlockPosition>[][][] pattern)
public int getDepth()
public int getHeight()
public int getWidth()
@Nullable private BlockPattern.Result testTransform(BlockPos frontTopLeft, Direction forwards, Direction up, LoadingCache<BlockPos,CachedBlockPosition> cache)
@Nullable public BlockPattern.Result searchAround(WorldView world, BlockPos pos)
public static LoadingCache<BlockPos,CachedBlockPosition> makeCache(WorldView world, boolean forceLoad)