public class BlockPattern
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
BlockPattern.CacheLoader |
static class |
BlockPattern.PatternHelper |
Modifier and Type | Field and Description |
---|---|
private com.google.common.base.Predicate<BlockWorldState>[][][] |
blockMatches |
private int |
fingerLength |
private int |
palmLength |
private int |
thumbLength |
Constructor and Description |
---|
BlockPattern(com.google.common.base.Predicate<BlockWorldState>[][][] predicatesIn) |
Modifier and Type | Method and Description |
---|---|
private BlockPattern.PatternHelper |
checkPatternAt(BlockPos pos,
EnumFacing finger,
EnumFacing thumb,
com.google.common.cache.LoadingCache<BlockPos,BlockWorldState> lcache)
checks that the given pattern & rotation is at the block co-ordinates.
|
static com.google.common.cache.LoadingCache<BlockPos,BlockWorldState> |
func_181627_a(World p_181627_0_,
boolean p_181627_1_) |
int |
getPalmLength() |
int |
getThumbLength() |
BlockPattern.PatternHelper |
match(World worldIn,
BlockPos pos)
Calculates whether the given world position matches the pattern.
|
protected static BlockPos |
translateOffset(BlockPos pos,
EnumFacing finger,
EnumFacing thumb,
int palmOffset,
int thumbOffset,
int fingerOffset)
Offsets the position of pos in the direction of finger and thumb facing by offset amounts, follows the right-hand
rule for cross products (finger, thumb, palm) @return A new BlockPos offset in the facing directions
|
private final com.google.common.base.Predicate<BlockWorldState>[][][] blockMatches
private final int fingerLength
private final int thumbLength
private final int palmLength
public BlockPattern(com.google.common.base.Predicate<BlockWorldState>[][][] predicatesIn)
public int getThumbLength()
public int getPalmLength()
private BlockPattern.PatternHelper checkPatternAt(BlockPos pos, EnumFacing finger, EnumFacing thumb, com.google.common.cache.LoadingCache<BlockPos,BlockWorldState> lcache)
public BlockPattern.PatternHelper match(World worldIn, BlockPos pos)
public static com.google.common.cache.LoadingCache<BlockPos,BlockWorldState> func_181627_a(World p_181627_0_, boolean p_181627_1_)
protected static BlockPos translateOffset(BlockPos pos, EnumFacing finger, EnumFacing thumb, int palmOffset, int thumbOffset, int fingerOffset)