diff options
| author | Giovanni Harting <539@idlegandalf.com> | 2016-05-02 14:11:14 +0200 |
|---|---|---|
| committer | Giovanni Harting <539@idlegandalf.com> | 2016-05-02 14:11:14 +0200 |
| commit | d337fe1ec8160d5a7dfe17b9789d07a07fab40ca (patch) | |
| tree | 657611a9530c97b1659d170f0fc3ce78f50c2ce9 | |
| parent | b6fb0f9ed9c7380c36b79ade8a73fe30ce52dbda (diff) | |
optimized wordgen
| -rw-r--r-- | src/main/java/main/util/StateMatcher.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/main/util/StateMatcher.java b/src/main/java/main/util/StateMatcher.java index 6e28c80..66eabfe 100644 --- a/src/main/java/main/util/StateMatcher.java +++ b/src/main/java/main/util/StateMatcher.java @@ -25,10 +25,11 @@ public class StateMatcher implements Predicate<IBlockState> { public boolean apply(IBlockState state, BlockPos pos, World world) { if (state != null) { if (property != null && value != null) { - if (checkLayerForBlocks(pos.getX(), pos.getZ(), pos.getY() - 1, world, pos) || - checkLayerForBlocks(pos.getX(), pos.getZ(), pos.getY(), world, pos) || - checkLayerForBlocks(pos.getX(), pos.getZ(), pos.getY() + 1, world, pos)) - return true; + if (state.getBlock() == this.state.getBlock()) + if (checkLayerForBlocks(3, 3, -1, world, pos) || + checkLayerForBlocks(3, 3, 0, world, pos) || + checkLayerForBlocks(3, 3, 1, world, pos)) + return true; } else return state.getBlock() == this.state.getBlock(); |
