From 632e05c4c28536fe5ae6eac9b9a72dccce3f3c5e Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Tue, 20 Feb 2024 21:32:55 +0100 Subject: [PATCH 01/11] Make `buildSkipBlocks` use a wrapper schematic --- .../java/baritone/process/BuilderProcess.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index 0ae796e6e..90a89919d 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -28,6 +28,7 @@ import baritone.api.schematic.FillSchematic; import baritone.api.schematic.ISchematic; import baritone.api.schematic.IStaticSchematic; +import baritone.api.schematic.MaskSchematic; import baritone.api.schematic.SubstituteSchematic; import baritone.api.schematic.format.ISchematicFormat; import baritone.api.utils.*; @@ -110,6 +111,14 @@ public void build(String name, ISchematic schematic, Vec3i origin) { if (!Baritone.settings().buildSubstitutes.value.isEmpty()) { this.schematic = new SubstituteSchematic(this.schematic, Baritone.settings().buildSubstitutes.value); } + // TODO this preserves the old behavior, but maybe we should bake the setting value right here + this.schematic = new MaskSchematic(this.schematic) { + @Override + public boolean partOfMask(int x, int y, int z, BlockState current) { + // partOfMask is only called inside the schematic so desiredState is not null + return !Baritone.settings().buildSkipBlocks.value.contains(this.desiredState(x, y, z, current, null).getBlock()); + } + }; int x = origin.getX(); int y = origin.getY(); int z = origin.getZ(); @@ -683,8 +692,7 @@ private void fullRecalc(BuilderCalculationContext bcc) { continue; } // this is not in render distance - if (!observedCompleted.contains(BetterBlockPos.longHash(blockX, blockY, blockZ)) - && !Baritone.settings().buildSkipBlocks.value.contains(schematic.desiredState(x, y, z, current, this.approxPlaceable).getBlock())) { + if (!observedCompleted.contains(BetterBlockPos.longHash(blockX, blockY, blockZ))) { // and we've never seen this position be correct // therefore mark as incorrect incorrectPositions.add(new BetterBlockPos(blockX, blockY, blockZ)); @@ -1066,9 +1074,6 @@ private boolean valid(BlockState current, BlockState desired, boolean itemVerify if (!(current.getBlock() instanceof AirBlock) && Baritone.settings().buildIgnoreExisting.value && !itemVerify) { return true; } - if (Baritone.settings().buildSkipBlocks.value.contains(desired.getBlock()) && !itemVerify) { - return true; - } if (Baritone.settings().buildValidSubstitutes.value.getOrDefault(desired.getBlock(), Collections.emptyList()).contains(current.getBlock()) && !itemVerify) { return true; } @@ -1112,7 +1117,7 @@ public double costOfPlacingAt(int x, int y, int z, BlockState current) { return COST_INF; } BlockState sch = getSchematic(x, y, z, current); - if (sch != null && !Baritone.settings().buildSkipBlocks.value.contains(sch.getBlock())) { + if (sch != null) { // TODO this can return true even when allowPlace is off.... is that an issue? if (sch.getBlock() instanceof AirBlock) { // we want this to be air, but they're asking if they can place here @@ -1146,7 +1151,7 @@ public double breakCostMultiplierAt(int x, int y, int z, BlockState current) { return COST_INF; } BlockState sch = getSchematic(x, y, z, current); - if (sch != null && !Baritone.settings().buildSkipBlocks.value.contains(sch.getBlock())) { + if (sch != null) { if (sch.getBlock() instanceof AirBlock) { // it should be air // regardless of current contents, we can break it From 2a2842361b57f11bfe4a3bacc855c393bf70652d Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Tue, 20 Feb 2024 21:33:53 +0100 Subject: [PATCH 02/11] Consistently use helper method and make a safe cast unnecessary --- .../java/baritone/process/BuilderProcess.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index 90a89919d..1fad7bd12 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -177,15 +177,15 @@ public boolean build(String name, File schematic, Vec3i origin) { if (!format.isPresent()) { return false; } - ISchematic parsed; + IStaticSchematic parsed; try { parsed = format.get().parse(new FileInputStream(schematic)); } catch (Exception e) { e.printStackTrace(); return false; } - parsed = applyMapArtAndSelection(origin, (IStaticSchematic) parsed); - build(name, parsed, origin); + ISchematic schem = applyMapArtAndSelection(origin, parsed); + build(name, schem, origin); return true; } @@ -205,17 +205,10 @@ public void buildOpenSchematic() { if (SchematicaHelper.isSchematicaPresent()) { Optional> schematic = SchematicaHelper.getOpenSchematic(); if (schematic.isPresent()) { - IStaticSchematic s = schematic.get().getA(); + IStaticSchematic raw = schematic.get().getA(); BlockPos origin = schematic.get().getB(); - ISchematic schem = Baritone.settings().mapArtMode.value ? new MapArtSchematic(s) : s; - if (Baritone.settings().buildOnlySelection.value) { - schem = new SelectionSchematic(schem, origin, baritone.getSelectionManager().getSelections()); - } - this.build( - schematic.get().getA().toString(), - schem, - origin - ); + ISchematic schem = applyMapArtAndSelection(origin, raw); + this.build(raw.toString(), schem, origin); } else { logDirect("No schematic currently open"); } From 24c23e28ec893f1b842b1aee9b178322add3d960 Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Tue, 20 Feb 2024 21:35:59 +0100 Subject: [PATCH 03/11] Reduce recursion limit and fix visibility --- src/main/java/baritone/process/BuilderProcess.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index 1fad7bd12..d77c74df2 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -440,8 +440,8 @@ public PathingCommand onTick(boolean calcFailed, boolean isSafeToCancel) { return onTick(calcFailed, isSafeToCancel, 0); } - public PathingCommand onTick(boolean calcFailed, boolean isSafeToCancel, int recursions) { - if (recursions > 1000) { // onTick calls itself, don't crash + private PathingCommand onTick(boolean calcFailed, boolean isSafeToCancel, int recursions) { + if (recursions > 100) { // onTick calls itself, don't crash return new PathingCommand(null, PathingCommandType.SET_GOAL_AND_PATH); } approxPlaceable = approxPlaceable(36); From 28ba97c3deab3cc4b6bb76ee1ff863a6ba448225 Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Wed, 21 Feb 2024 23:13:46 +0100 Subject: [PATCH 04/11] Move up and fix access modifiers --- .../java/baritone/process/BuilderProcess.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index d77c74df2..7c867c563 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -85,6 +85,14 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuilderProcess { + private static final Set> ORIENTATION_PROPS = + ImmutableSet.of( + RotatedPillarBlock.AXIS, HorizontalDirectionalBlock.FACING, + StairBlock.FACING, StairBlock.HALF, StairBlock.SHAPE, + PipeBlock.NORTH, PipeBlock.EAST, PipeBlock.SOUTH, PipeBlock.WEST, PipeBlock.UP, + TrapDoorBlock.OPEN, TrapDoorBlock.HALF + ); + private HashSet incorrectPositions; private LongOpenHashSet observedCompleted; // positions that are completed even if they're out of render distance and we can't make sure right now private String name; @@ -1010,15 +1018,7 @@ private List approxPlaceable(int size) { return result; } - public static final Set> orientationProps = - ImmutableSet.of( - RotatedPillarBlock.AXIS, HorizontalDirectionalBlock.FACING, - StairBlock.FACING, StairBlock.HALF, StairBlock.SHAPE, - PipeBlock.NORTH, PipeBlock.EAST, PipeBlock.SOUTH, PipeBlock.WEST, PipeBlock.UP, - TrapDoorBlock.OPEN, TrapDoorBlock.HALF - ); - - private boolean sameBlockstate(BlockState first, BlockState second) { + private static boolean sameBlockstate(BlockState first, BlockState second) { if (first.getBlock() != second.getBlock()) { return false; } @@ -1031,7 +1031,7 @@ private boolean sameBlockstate(BlockState first, BlockState second) { ImmutableMap, Comparable> map2 = second.getValues(); for (Property prop : map1.keySet()) { if (map1.get(prop) != map2.get(prop) - && !(ignoreDirection && orientationProps.contains(prop)) + && !(ignoreDirection && ORIENTATION_PROPS.contains(prop)) && !ignoredProps.contains(prop.getName())) { return false; } @@ -1039,7 +1039,7 @@ private boolean sameBlockstate(BlockState first, BlockState second) { return true; } - private boolean containsBlockState(Collection states, BlockState state) { + private static boolean containsBlockState(Collection states, BlockState state) { for (BlockState testee : states) { if (sameBlockstate(testee, state)) { return true; @@ -1048,7 +1048,7 @@ private boolean containsBlockState(Collection states, BlockState sta return false; } - private boolean valid(BlockState current, BlockState desired, boolean itemVerify) { + private static boolean valid(BlockState current, BlockState desired, boolean itemVerify) { if (desired == null) { return true; } From 92aba1b78eb14804756185ddbf54b1f0cfa7b30c Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Wed, 6 Mar 2024 02:19:17 +0100 Subject: [PATCH 05/11] Update workflows --- .github/workflows/gradle_build.yml | 8 ++++---- .github/workflows/run_tests.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gradle_build.yml b/.github/workflows/gradle_build.yml index 9d4ed379b..56c11e193 100644 --- a/.github/workflows/gradle_build.yml +++ b/.github/workflows/gradle_build.yml @@ -13,12 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' @@ -31,13 +31,13 @@ jobs: run: ./gradlew build -Pmod_version="$(git describe --always --tags --first-parent | cut -c2-)" - name: Archive Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Artifacts path: dist/ - name: Archive mapping.txt - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Mappings path: mapping/ diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 34d52e54c..04b26b422 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -11,9 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' From d86a34a5275c55e799628a835e24a62fba045e95 Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Sun, 25 Feb 2024 19:29:03 +0100 Subject: [PATCH 06/11] Fix too low bound and log spam --- .../java/baritone/utils/schematic/MapArtSchematic.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/baritone/utils/schematic/MapArtSchematic.java b/src/main/java/baritone/utils/schematic/MapArtSchematic.java index 4f71aea64..723be3983 100644 --- a/src/main/java/baritone/utils/schematic/MapArtSchematic.java +++ b/src/main/java/baritone/utils/schematic/MapArtSchematic.java @@ -41,6 +41,7 @@ protected boolean partOfMask(int x, int y, int z, BlockState currentState) { private static int[][] generateHeightMap(IStaticSchematic schematic) { int[][] heightMap = new int[schematic.widthX()][schematic.lengthZ()]; + int missingColumns = 0; for (int x = 0; x < schematic.widthX(); x++) { for (int z = 0; z < schematic.lengthZ(); z++) { BlockState[] column = schematic.getColumn(x, z); @@ -48,12 +49,14 @@ private static int[][] generateHeightMap(IStaticSchematic schematic) { if (lowestBlockY.isPresent()) { heightMap[x][z] = lowestBlockY.getAsInt(); } else { - System.out.println("Column " + x + "," + z + " has no blocks, but it's apparently map art? wtf"); - System.out.println("Letting it be whatever"); - heightMap[x][z] = 256; + missingColumns++; + heightMap[x][z] = Integer.MAX_VALUE; } } } + if (missingColumns != 0) { + System.out.println(missingColumns + " columns had no block despite being in a map art, letting them be whatever"); + } return heightMap; } From 4c9253fa5e65ad62cf5ee079af50a07fd45f38c1 Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Sun, 25 Feb 2024 19:24:07 +0100 Subject: [PATCH 07/11] Add `placeIncorrectBlockPenaltyMultiplier` builder setting --- src/api/java/baritone/api/Settings.java | 5 +++++ src/main/java/baritone/process/BuilderProcess.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index 5e33b39ba..9900ef8e9 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -1058,6 +1058,11 @@ public final class Settings { */ public final Setting breakCorrectBlockPenaltyMultiplier = new Setting<>(10d); + /** + * Multiply the cost of placing a block that's incorrect in the builder's schematic by this coefficient + */ + public final Setting placeIncorrectBlockPenaltyMultiplier = new Setting<>(2d); + /** * When this setting is true, build a schematic with the highest X coordinate being the origin, instead of the lowest */ diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index 7c867c563..f09a469e7 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -1115,7 +1115,7 @@ public double costOfPlacingAt(int x, int y, int z, BlockState current) { if (sch.getBlock() instanceof AirBlock) { // we want this to be air, but they're asking if they can place here // this won't be a schematic block, this will be a throwaway - return placeBlockCost * 2; // we're going to have to break it eventually + return placeBlockCost * Baritone.settings().placeIncorrectBlockPenaltyMultiplier.value; // we're going to have to break it eventually } if (placeable.contains(sch)) { return 0; // thats right we gonna make it FREE to place a block where it should go in a structure @@ -1128,7 +1128,7 @@ public double costOfPlacingAt(int x, int y, int z, BlockState current) { } // we want it to be something that we don't have // even more of a pain to place something wrong - return placeBlockCost * 3; + return placeBlockCost * 1.5 * Baritone.settings().placeIncorrectBlockPenaltyMultiplier.value; } else { if (hasThrowaway) { return placeBlockCost; From 413c11a23e02050eae6e7839fc9110eee78b278d Mon Sep 17 00:00:00 2001 From: rfresh2 <89827146+rfresh2@users.noreply.github.com> Date: Sat, 9 Mar 2024 13:22:15 -0800 Subject: [PATCH 08/11] block break delay setting --- src/api/java/baritone/api/Settings.java | 7 +++++++ src/main/java/baritone/utils/BlockBreakHelper.java | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index 5e33b39ba..5dd68ab6a 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -385,6 +385,13 @@ public final class Settings { */ public final Setting blockReachDistance = new Setting<>(4.5f); + + /** + * Delay between breaking a block and starting to break the next block. The vanilla delay is 6 ticks. + * Baritone waits an additional 2 ticks on top of this setting value. + */ + public final Setting blockBreakDelay = new Setting<>(4); + /** * How many degrees to randomize the pitch and yaw every tick. Set to 0 to disable */ diff --git a/src/main/java/baritone/utils/BlockBreakHelper.java b/src/main/java/baritone/utils/BlockBreakHelper.java index 2d209c721..f6cc58837 100644 --- a/src/main/java/baritone/utils/BlockBreakHelper.java +++ b/src/main/java/baritone/utils/BlockBreakHelper.java @@ -17,6 +17,7 @@ package baritone.utils; +import baritone.api.BaritoneAPI; import baritone.api.utils.IPlayerContext; import net.minecraft.world.InteractionHand; import net.minecraft.world.phys.BlockHitResult; @@ -30,6 +31,7 @@ public final class BlockBreakHelper { private final IPlayerContext ctx; private boolean didBreakLastTick; + private int breakDelay = 0; BlockBreakHelper(IPlayerContext ctx) { this.ctx = ctx; @@ -48,6 +50,11 @@ public void stopBreakingBlock() { } public void tick(boolean isLeftClick) { + if (breakDelay > 0) { + breakDelay--; + return; + } + HitResult trace = ctx.objectMouseOver(); boolean isBlockTrace = trace != null && trace.getType() == HitResult.Type.BLOCK; @@ -68,6 +75,7 @@ public void tick(boolean isLeftClick) { didBreakLastTick = true; } else if (didBreakLastTick) { stopBreakingBlock(); + breakDelay = BaritoneAPI.getSettings().blockBreakDelay.value; didBreakLastTick = false; } } From faece77e8c79680558b582a097683f0f94facd41 Mon Sep 17 00:00:00 2001 From: rfresh2 <89827146+rfresh2@users.noreply.github.com> Date: Sun, 10 Mar 2024 16:43:58 -0700 Subject: [PATCH 09/11] align setting value with actual tick delay between breaks --- src/api/java/baritone/api/Settings.java | 7 +++---- src/main/java/baritone/utils/BlockBreakHelper.java | 11 ++++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index 5dd68ab6a..568fc4547 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -385,12 +385,11 @@ public final class Settings { */ public final Setting blockReachDistance = new Setting<>(4.5f); - /** - * Delay between breaking a block and starting to break the next block. The vanilla delay is 6 ticks. - * Baritone waits an additional 2 ticks on top of this setting value. + * How many ticks between breaking a block and starting to break the next block. Default in game is 6 ticks. + * Values under 2 will be clamped. */ - public final Setting blockBreakDelay = new Setting<>(4); + public final Setting blockBreakSpeed = new Setting<>(6); /** * How many degrees to randomize the pitch and yaw every tick. Set to 0 to disable diff --git a/src/main/java/baritone/utils/BlockBreakHelper.java b/src/main/java/baritone/utils/BlockBreakHelper.java index f6cc58837..3332aec76 100644 --- a/src/main/java/baritone/utils/BlockBreakHelper.java +++ b/src/main/java/baritone/utils/BlockBreakHelper.java @@ -28,10 +28,12 @@ * @since 8/25/2018 */ public final class BlockBreakHelper { + // base ticks between block breaks caused by tick logic + private static final int BASE_BREAK_DELAY = 2; private final IPlayerContext ctx; private boolean didBreakLastTick; - private int breakDelay = 0; + private int breakDelayTimer = 0; BlockBreakHelper(IPlayerContext ctx) { this.ctx = ctx; @@ -50,11 +52,10 @@ public void stopBreakingBlock() { } public void tick(boolean isLeftClick) { - if (breakDelay > 0) { - breakDelay--; + if (breakDelayTimer > 0) { + breakDelayTimer--; return; } - HitResult trace = ctx.objectMouseOver(); boolean isBlockTrace = trace != null && trace.getType() == HitResult.Type.BLOCK; @@ -75,7 +76,7 @@ public void tick(boolean isLeftClick) { didBreakLastTick = true; } else if (didBreakLastTick) { stopBreakingBlock(); - breakDelay = BaritoneAPI.getSettings().blockBreakDelay.value; + breakDelayTimer = BaritoneAPI.getSettings().blockBreakSpeed.value - BASE_BREAK_DELAY; didBreakLastTick = false; } } From 18d3c4c2bd4b7ae57c9b801655132b5ebcb0c899 Mon Sep 17 00:00:00 2001 From: rfresh2 <89827146+rfresh2@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:00:08 -0700 Subject: [PATCH 10/11] align rightClickSpeed setting with actual delay --- src/main/java/baritone/utils/BlockPlaceHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/utils/BlockPlaceHelper.java b/src/main/java/baritone/utils/BlockPlaceHelper.java index 93b0c4408..ca8d50523 100644 --- a/src/main/java/baritone/utils/BlockPlaceHelper.java +++ b/src/main/java/baritone/utils/BlockPlaceHelper.java @@ -25,6 +25,8 @@ import net.minecraft.world.phys.HitResult; public class BlockPlaceHelper { + // base ticks between places caused by tick logic + private static final int BASE_PLACE_DELAY = 1; private final IPlayerContext ctx; private int rightClickTimer; @@ -42,7 +44,7 @@ public void tick(boolean rightClickRequested) { if (!rightClickRequested || ctx.player().isHandsBusy() || mouseOver == null || mouseOver.getType() != HitResult.Type.BLOCK) { return; } - rightClickTimer = Baritone.settings().rightClickSpeed.value; + rightClickTimer = Baritone.settings().rightClickSpeed.value - BASE_PLACE_DELAY; for (InteractionHand hand : InteractionHand.values()) { if (ctx.playerController().processRightClickBlock(ctx.player(), ctx.world(), hand, (BlockHitResult) mouseOver) == InteractionResult.SUCCESS) { ctx.player().swing(hand); From 5826931eeaec8f4f892a84dd5d2d324e8d23beac Mon Sep 17 00:00:00 2001 From: ZacSharp <68165024+ZacSharp@users.noreply.github.com> Date: Fri, 29 Mar 2024 03:17:00 +0100 Subject: [PATCH 11/11] Fix NPE --- src/main/java/baritone/process/BuilderProcess.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index f09a469e7..4b49398a0 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -124,7 +124,7 @@ public void build(String name, ISchematic schematic, Vec3i origin) { @Override public boolean partOfMask(int x, int y, int z, BlockState current) { // partOfMask is only called inside the schematic so desiredState is not null - return !Baritone.settings().buildSkipBlocks.value.contains(this.desiredState(x, y, z, current, null).getBlock()); + return !Baritone.settings().buildSkipBlocks.value.contains(this.desiredState(x, y, z, current, Collections.emptyList()).getBlock()); } }; int x = origin.getX();