Package baritone.api.schematic
Class MaskSchematic
java.lang.Object
baritone.api.schematic.AbstractSchematic
baritone.api.schematic.MaskSchematic
- All Implemented Interfaces:
ISchematic
- Direct Known Subclasses:
ReplaceSchematic,ShellSchematic,WallsSchematic
-
Field Summary
Fields inherited from class baritone.api.schematic.AbstractSchematic
x, y, z -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MaskSchematiccreate(ISchematic schematic, Mask function) net.minecraft.world.level.block.state.BlockStatedesiredState(int x, int y, int z, net.minecraft.world.level.block.state.BlockState current, List<net.minecraft.world.level.block.state.BlockState> approxPlaceable) Returns the desired block state at a given (X, Y, Z) position relative to the origin (0, 0, 0).booleaninSchematic(int x, int y, int z, net.minecraft.world.level.block.state.BlockState currentState) Does the block at this coordinate matter to the schematic?protected abstract booleanpartOfMask(int x, int y, int z, net.minecraft.world.level.block.state.BlockState currentState) Methods inherited from class baritone.api.schematic.AbstractSchematic
heightY, lengthZ, widthXMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface baritone.api.schematic.ISchematic
reset, size
-
Constructor Details
-
MaskSchematic
-
-
Method Details
-
partOfMask
protected abstract boolean partOfMask(int x, int y, int z, net.minecraft.world.level.block.state.BlockState currentState) -
inSchematic
public boolean inSchematic(int x, int y, int z, net.minecraft.world.level.block.state.BlockState currentState) Description copied from interface:ISchematicDoes the block at this coordinate matter to the schematic?Normally just a check for if the coordinate is in the cube.
However, in the case of something like a map art, anything that's below the level of the map art doesn't matter, so this function should return false in that case. (i.e. it doesn't really have to be air below the art blocks)
- Parameters:
x- The x position of the block, relative to the originy- The y position of the block, relative to the originz- The z position of the block, relative to the origincurrentState- The current state of that block in the world, or null- Returns:
- Whether or not the specified position is within the bounds of this schematic
-
desiredState
public net.minecraft.world.level.block.state.BlockState desiredState(int x, int y, int z, net.minecraft.world.level.block.state.BlockState current, List<net.minecraft.world.level.block.state.BlockState> approxPlaceable) Description copied from interface:ISchematicReturns the desired block state at a given (X, Y, Z) position relative to the origin (0, 0, 0).- Parameters:
x- The x position of the block, relative to the originy- The y position of the block, relative to the originz- The z position of the block, relative to the origincurrent- The current state of that block in the world, or nullapproxPlaceable- The list of blockstates estimated to be placeable- Returns:
- The desired block state at the specified position
-
create
-