Class MaskSchematic

java.lang.Object
baritone.api.schematic.AbstractSchematic
baritone.api.schematic.MaskSchematic
All Implemented Interfaces:
ISchematic
Direct Known Subclasses:
ReplaceSchematic, ShellSchematic, WallsSchematic

public abstract class MaskSchematic extends AbstractSchematic
  • Field Summary

    Fields inherited from class baritone.api.schematic.AbstractSchematic

    x, y, z
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(ISchematic schematic, Mask function)
     
    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).
    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?
    protected abstract boolean
    partOfMask(int x, int y, int z, net.minecraft.world.level.block.state.BlockState currentState)
     

    Methods inherited from class baritone.api.schematic.AbstractSchematic

    heightY, lengthZ, widthX

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface baritone.api.schematic.ISchematic

    reset, size
  • Constructor Details

  • 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: ISchematic
      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 origin
      y - The y position of the block, relative to the origin
      z - The z position of the block, relative to the origin
      currentState - 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: ISchematic
      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 origin
      y - The y position of the block, relative to the origin
      z - The z position of the block, relative to the origin
      current - The current state of that block in the world, or null
      approxPlaceable - The list of blockstates estimated to be placeable
      Returns:
      The desired block state at the specified position
    • create

      public static MaskSchematic create(ISchematic schematic, Mask function)