Class BlockPattern
java.lang.Object
net.minecraft.world.level.block.state.pattern.BlockPattern
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.cache.LoadingCache<BlockPos, BlockInWorld> createLevelCache(LevelReader level, boolean loadChunks) @Nullable BlockPattern.BlockPatternMatchfind(LevelReader level, BlockPos origin) intgetDepth()intPredicate<BlockInWorld>[][][]intgetWidth()private @Nullable BlockPattern.BlockPatternMatchmatches(BlockPos origin, Direction forwards, Direction up, com.google.common.cache.LoadingCache<BlockPos, BlockInWorld> cache) @Nullable BlockPattern.BlockPatternMatchmatches(LevelReader level, BlockPos origin, Direction forwards, Direction up) protected static BlockPostranslateAndRotate(BlockPos origin, Direction forwardsDirection, Direction upDirection, int right, int down, int forwards)
-
Field Details
-
pattern
-
depth
private final int depth -
height
private final int height -
width
private final int width
-
-
Constructor Details
-
BlockPattern
-
-
Method Details
-
getDepth
public int getDepth() -
getHeight
public int getHeight() -
getWidth
public int getWidth() -
getPattern
-
matches
public @Nullable BlockPattern.BlockPatternMatch matches(LevelReader level, BlockPos origin, Direction forwards, Direction up) -
matches
private @Nullable BlockPattern.BlockPatternMatch matches(BlockPos origin, Direction forwards, Direction up, com.google.common.cache.LoadingCache<BlockPos, BlockInWorld> cache) -
find
-
createLevelCache
public static com.google.common.cache.LoadingCache<BlockPos, BlockInWorld> createLevelCache(LevelReader level, boolean loadChunks) -
translateAndRotate
-