diff --git a/src/api/java/baritone/api/schematic/FillSchematic.java b/src/api/java/baritone/api/schematic/FillSchematic.java index fbf16fb47..de9ccf970 100644 --- a/src/api/java/baritone/api/schematic/FillSchematic.java +++ b/src/api/java/baritone/api/schematic/FillSchematic.java @@ -32,15 +32,16 @@ public class FillSchematic extends AbstractSchematic { this.bom = bom; } + public FillSchematic(int x, int y, int z, IBlockState state) { + this(x, y, z, new BlockOptionalMeta(state.getBlock(), state.getBlock().getMetaFromState(state))); + } + public BlockOptionalMeta getBom() { return bom; } @Override public IBlockState desiredState(int x, int y, int z, IBlockState current, List approxPlaceable) { - // TODO: is this even necessary??? - // Builder will already handle logic that requires breaking blocks before replacing them, and non-api Fill Schematic - // is used for clear area and doesn't have any issues. if (bom.matches(current)) { return current; } else if (current.getBlock() != Blocks.AIR) { diff --git a/src/main/java/baritone/process/BuilderProcess.java b/src/main/java/baritone/process/BuilderProcess.java index 1dfd6c82f..88338a014 100644 --- a/src/main/java/baritone/process/BuilderProcess.java +++ b/src/main/java/baritone/process/BuilderProcess.java @@ -25,6 +25,7 @@ import baritone.api.pathing.goals.GoalGetToBlock; import baritone.api.process.IBuilderProcess; import baritone.api.process.PathingCommand; import baritone.api.process.PathingCommandType; +import baritone.api.schematic.FillSchematic; import baritone.api.schematic.ISchematic; import baritone.api.utils.BetterBlockPos; import baritone.api.utils.RayTraceUtils; @@ -37,7 +38,6 @@ import baritone.pathing.movement.MovementHelper; import baritone.utils.BaritoneProcessHelper; import baritone.utils.BlockStateInterface; import baritone.utils.PathingCommandContext; -import baritone.utils.schematic.FillSchematic; import baritone.utils.schematic.MapArtSchematic; import baritone.utils.schematic.format.SchematicFormat; import baritone.utils.schematic.schematica.SchematicaHelper; diff --git a/src/main/java/baritone/utils/schematic/FillSchematic.java b/src/main/java/baritone/utils/schematic/FillSchematic.java deleted file mode 100644 index 67e5c7342..000000000 --- a/src/main/java/baritone/utils/schematic/FillSchematic.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of Baritone. - * - * Baritone is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Baritone is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Baritone. If not, see . - */ - -package baritone.utils.schematic; - -import baritone.api.schematic.AbstractSchematic; -import net.minecraft.block.state.IBlockState; - -import java.util.List; - -public class FillSchematic extends AbstractSchematic { - - private final IBlockState state; - - public FillSchematic(int widthX, int heightY, int lengthZ, IBlockState state) { - super(widthX, heightY, lengthZ); - this.state = state; - } - - @Override - public IBlockState desiredState(int x, int y, int z, IBlockState current, List approxPlaceable) { - return state; - } -}