Package baritone.api.schematic
Interface ISchematic
- All Known Subinterfaces:
IStaticSchematic
- All Known Implementing Classes:
AbstractSchematic,CompositeSchematic,FillSchematic,MaskSchematic,MirroredSchematic,ReplaceSchematic,RotatedSchematic,ShellSchematic,SubstituteSchematic,WallsSchematic
public interface ISchematic
Basic representation of a schematic. Provides the dimensions and the desired state for a given position relative to
the origin.
- Author:
- leijurv
-
Method Summary
Modifier and TypeMethodDescriptionnet.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).intheightY()default 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?intlengthZ()default voidreset()Resets possible caches to avoid wrong behavior when moving the schematic arounddefault intsize(net.minecraft.core.Direction.Axis axis) intwidthX()
-
Method Details
-
inSchematic
default boolean inSchematic(int x, int y, int z, net.minecraft.world.level.block.state.BlockState currentState) Does 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
-
size
-
desiredState
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) Returns 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
-
reset
Resets possible caches to avoid wrong behavior when moving the schematic around -
widthX
int widthX()- Returns:
- The width (X axis length) of this schematic
-
heightY
int heightY()- Returns:
- The height (Y axis length) of this schematic
-
lengthZ
int lengthZ()- Returns:
- The length (Z axis length) of this schematic
-