ground work for more build commands
This commit is contained in:
parent
c1749057d9
commit
b405a610bb
@ -33,7 +33,7 @@ import baritone.pathing.movement.MovementHelper;
|
|||||||
import baritone.utils.BaritoneProcessHelper;
|
import baritone.utils.BaritoneProcessHelper;
|
||||||
import baritone.utils.BlockStateInterface;
|
import baritone.utils.BlockStateInterface;
|
||||||
import baritone.utils.PathingCommandContext;
|
import baritone.utils.PathingCommandContext;
|
||||||
import baritone.utils.schematic.AirSchematic;
|
import baritone.utils.schematic.FillSchematic;
|
||||||
import baritone.utils.schematic.MapArtSchematic;
|
import baritone.utils.schematic.MapArtSchematic;
|
||||||
import baritone.utils.schematic.Schematic;
|
import baritone.utils.schematic.Schematic;
|
||||||
import baritone.utils.schematic.schematica.SchematicaHelper;
|
import baritone.utils.schematic.schematica.SchematicaHelper;
|
||||||
@ -132,7 +132,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
|||||||
int widthX = Math.abs(corner1.getX() - corner2.getX()) + 1;
|
int widthX = Math.abs(corner1.getX() - corner2.getX()) + 1;
|
||||||
int heightY = Math.abs(corner1.getY() - corner2.getY()) + 1;
|
int heightY = Math.abs(corner1.getY() - corner2.getY()) + 1;
|
||||||
int lengthZ = Math.abs(corner1.getZ() - corner2.getZ()) + 1;
|
int lengthZ = Math.abs(corner1.getZ() - corner2.getZ()) + 1;
|
||||||
build("clear area", new AirSchematic(widthX, heightY, lengthZ), origin);
|
build("clear area", new FillSchematic(widthX, heightY, lengthZ, Blocks.AIR.getDefaultState()), origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ISchematic parse(NBTTagCompound schematic) {
|
private static ISchematic parse(NBTTagCompound schematic) {
|
||||||
|
@ -21,21 +21,22 @@ import baritone.api.utils.ISchematic;
|
|||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
|
||||||
public class AirSchematic implements ISchematic {
|
public class FillSchematic implements ISchematic {
|
||||||
|
|
||||||
private final int widthX;
|
private final int widthX;
|
||||||
private final int heightY;
|
private final int heightY;
|
||||||
private final int lengthZ;
|
private final int lengthZ;
|
||||||
|
private final IBlockState state;
|
||||||
|
|
||||||
public AirSchematic(int widthX, int heightY, int lengthZ) {
|
public FillSchematic(int widthX, int heightY, int lengthZ, IBlockState state) {
|
||||||
this.widthX = widthX;
|
this.widthX = widthX;
|
||||||
this.heightY = heightY;
|
this.heightY = heightY;
|
||||||
this.lengthZ = lengthZ;
|
this.lengthZ = lengthZ;
|
||||||
|
this.state = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBlockState desiredState(int x, int y, int z) {
|
public IBlockState desiredState(int x, int y, int z) {
|
||||||
return Blocks.AIR.getDefaultState();
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
Loading…
x
Reference in New Issue
Block a user