WIP filter patterns

This commit is contained in:
Jesse Boyd
2019-05-12 23:32:04 +10:00
parent 459629a2f2
commit c797dcb194
61 changed files with 2075 additions and 793 deletions

View File

@@ -49,7 +49,7 @@ public class AreaPickaxe implements BlockTool {
for (int x = ox - range; x <= ox + range; ++x) {
for (int z = oz - range; z <= oz + range; ++z) {
for (int y = oy + range; y >= oy - range; --y) {
if (initialType.equals(editSession.getLazyBlock(x, y, z))) {
if (initialType.equals(editSession.getBlock(x, y, z))) {
continue;
}
editSession.setBlock(x, y, z, BlockTypes.AIR.getDefaultState());

View File

@@ -49,7 +49,7 @@ public class GravityBrush implements Brush {
for (int z = position.getBlockZ() + size; z > position.getBlockZ() - size; --z) {
int freeSpot = startCheckY;
for (int y = startCheckY; y <= endY; y++) {
BlockStateHolder block = editSession.getLazyBlock(x, y, z);
BlockStateHolder block = editSession.getBlock(x, y, z);
if (!block.getBlockType().getMaterial().isAir()) {
if (y != freeSpot) {
editSession.setBlock(x, y, z, EditSession.nullBlock);