Class RotatedSchematic

java.lang.Object
baritone.api.schematic.RotatedSchematic
All Implemented Interfaces:
ISchematic

public class RotatedSchematic extends Object implements ISchematic
  • Constructor Summary

    Constructors
    Constructor
    Description
    RotatedSchematic(ISchematic schematic, net.minecraft.world.level.block.Rotation rotation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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).
    int
     
    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?
    int
     
    void
    Resets possible caches to avoid wrong behavior when moving the schematic around
    int
     

    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

    size
  • Constructor Details

  • Method Details

    • 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)

      Specified by:
      inSchematic in interface ISchematic
      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).
      Specified by:
      desiredState in interface ISchematic
      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
    • reset

      public void reset()
      Description copied from interface: ISchematic
      Resets possible caches to avoid wrong behavior when moving the schematic around
      Specified by:
      reset in interface ISchematic
    • widthX

      public int widthX()
      Specified by:
      widthX in interface ISchematic
      Returns:
      The width (X axis length) of this schematic
    • heightY

      public int heightY()
      Specified by:
      heightY in interface ISchematic
      Returns:
      The height (Y axis length) of this schematic
    • lengthZ

      public int lengthZ()
      Specified by:
      lengthZ in interface ISchematic
      Returns:
      The length (Z axis length) of this schematic