Class SimplePlacementContext

java.lang.Object
com.ldtteam.structurize.placement.SimplePlacementContext
All Implemented Interfaces:
IPlacementContext

public class SimplePlacementContext extends Object implements IPlacementContext
Simple placement context for non blueprint handling.
  • Constructor Details

    • SimplePlacementContext

      public SimplePlacementContext(boolean fancyPlacement, RotationMirror rotationMirror)
  • Method Details

    • getRotationMirror

      public RotationMirror getRotationMirror()
      Description copied from interface: IPlacementContext
      Getter for the placement settings.
      Specified by:
      getRotationMirror in interface IPlacementContext
      Returns:
      the settings object.
    • fancyPlacement

      public boolean fancyPlacement()
      Description copied from interface: IPlacementContext
      If this is supposed to be fancy placement (player facing) or builder facing (complete).
      Specified by:
      fancyPlacement in interface IPlacementContext
      Returns:
      true if fancy placement.
    • getSolidBlockForPos

      public net.minecraft.world.level.block.state.BlockState getSolidBlockForPos(net.minecraft.core.BlockPos worldPos, Function<net.minecraft.core.BlockPos,@Nullable net.minecraft.world.level.block.state.BlockState> virtualBlocks)
      Description copied from interface: IPlacementContext
      Get the solid worldgen block for given pos while using data from handler.
      Specified by:
      getSolidBlockForPos in interface IPlacementContext
      Parameters:
      worldPos - the world pos.
      virtualBlocks - blueprint blocks, fnc may return null if virtual block is not available (then use level instead for getting surrounding block states), pos argument is using world coords
      Returns:
      the solid worldgen block (classically biome dependent).
    • getCenterPos

      public net.minecraft.core.BlockPos getCenterPos()
      Description copied from interface: IPlacementContext
      Get the world position this is placed at.
      Specified by:
      getCenterPos in interface IPlacementContext
      Returns:
      the position.
    • getBluePrint

      public Blueprint getBluePrint()
      Description copied from interface: IPlacementContext
      Get the bluerint from the handler.
      Specified by:
      getBluePrint in interface IPlacementContext
      Returns:
      the blueprint