Class ShapePlaceType

java.lang.Object
net.rodofire.easierworldcreator.shapeutil.ShapeBase
net.rodofire.easierworldcreator.shapeutil.ShapePlaceType
Direct Known Subclasses:
ShapeLayer

public abstract class ShapePlaceType extends ShapeBase
  • Constructor Details

    • ShapePlaceType

      public ShapePlaceType(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull ShapeBase.PlaceMoment placeMoment, ShapePlaceType.LayerPlace layerPlace)
      init the ShapePlaceType
      Parameters:
      world - the world the spiral will spawn in
      pos - the center of the spiral
      placeMoment - define the moment where the shape will be placed
      layerPlace - how the @BlockStates inside of a BlockLayer will be placed
    • ShapePlaceType

      public ShapePlaceType(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull ShapeBase.PlaceMoment placeMoment)
      init the ShapePlaceType
      Parameters:
      world - the world of the shape
      pos - the pos of the shape (usually the center of the structure)
      placeMoment - define the moment where the shape will be placed
  • Method Details

    • setLayerPlace

      public void setLayerPlace(ShapePlaceType.LayerPlace layerPlace)
    • getLayerPlace

      public ShapePlaceType.LayerPlace getLayerPlace()
    • setPlaceType

      public void setPlaceType(ShapePlaceType.PlaceType placeType)
    • getPlaceType

      public ShapePlaceType.PlaceType getPlaceType()
    • setNoise

      public void setNoise(FastNoiseLite noise)
    • getNoise

      public FastNoiseLite getNoise()
    • placeBlocks

      public void placeBlocks(int index, net.minecraft.util.math.BlockPos pos)
      place blocks without verification
      Parameters:
      index - the index of the the BlockLayer
      pos - the pos of the block
    • placeBlocks

      public void placeBlocks(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos)
      Place blocks without verification. Used for precomputed List<BlockStates> instead of searching it on the BlockLayer
      Parameters:
      states - states the states that will be chosen
      pos - the pos of the block
    • placeBlocksWithVerification

      public boolean placeBlocksWithVerification(int index, net.minecraft.util.math.BlockPos pos)
      place a block in the this.getWorld() at the pos if it is able to
      Parameters:
      index - the index of the the BlockLayer
      pos - the pos of the block
      Returns:
      boolean if the block was placed
    • placeBlocksWithVerification

      public boolean placeBlocksWithVerification(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos, boolean force, Set<net.minecraft.block.Block> blocksToForce)
      place a block in the this.getWorld() at the pos if it is able to. precomputed list for little performance improvement
      Parameters:
      states - the states that will be chosen
      pos - the pos of the block
      force - determine if the block can be posed on top of any block
      blocksToForce - set of blocks that determine the blocks that can be still forced
      Returns:
      boolean if the block was placed
    • placeBlocksWithVerification

      public boolean placeBlocksWithVerification(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos)
      place a block in the this.getWorld() at the pos if it is able to. precomputed list for little performance improvement
      Parameters:
      states - the states that will be chosen
      pos - the pos of the block
      Returns:
      boolean if the block was placed
    • getBlockToPlace

      public net.minecraft.block.BlockState getBlockToPlace(int index, net.minecraft.util.math.BlockPos pos)
      Used to get the blocksState notably used during this.getWorld() gen, this doesn't place anything
      Parameters:
      index - the index of the the BlockLayer
      pos - the pos of the block
      Returns:
      the BlockState related to the pos
    • getBlockToPlace

      public net.minecraft.block.BlockState getBlockToPlace(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos)
      Used to get the blocksState notably used during this.getWorld() gen, this doesn't place anything. Used for a precomputed BlockState list
      Parameters:
      states - the states that will be chosen
      pos - the pos of the block
      Returns:
      the BlockState related to the pos
    • verifyBlocks

      public boolean verifyBlocks(net.minecraft.util.math.BlockPos pos)