Class LayerPlacer

java.lang.Object
fr.rodofire.ewc.shape.block.placer.LayerPlacer

public class LayerPlacer extends Object
Class to define how the BlockState inside a BlockLayer should be placed depending on LayerPlacer.PlacingType
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    set how the blocks/particles will be chosen inside a layer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    LayerPlacer(int placedBlocks, LayerPlacer.PlacingType type)
    Deprecated, for removal: This API element is subject to removal in a future version.
    LayerPlacer(int placedBlocks, LayerPlacer.PlacingType type, net.minecraft.util.RandomSource random)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated, for removal: This API element is subject to removal in a future version.
    LayerPlacer(LayerPlacer.PlacingType type, net.minecraft.util.RandomSource random)
    Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.level.block.state.BlockState
    get(List<net.minecraft.world.level.block.state.BlockState> states, net.minecraft.core.BlockPos pos)
    Used to get the blocksState notably used during this.getWorld() gen, this doesn't place anything.
    net.minecraft.world.level.block.state.BlockState
    get(net.minecraft.world.level.block.state.BlockState[] states, net.minecraft.core.BlockPos pos)
     
     
     
     
     
     
     
    ofRandom(net.minecraft.util.RandomSource random)
     
    boolean
    place(net.minecraft.world.level.WorldGenLevel worldAccess, List<net.minecraft.world.level.block.state.BlockState> states, net.minecraft.core.BlockPos pos)
     
    boolean
    place(net.minecraft.world.level.WorldGenLevel worldAccess, List<net.minecraft.world.level.block.state.BlockState> states, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler)
    Used to get the blocksState notably used during this.getWorld() gen, this doesn't place anything.
    boolean
    place(net.minecraft.world.level.WorldGenLevel worldAccess, net.minecraft.world.level.block.state.BlockState[] states, net.minecraft.core.BlockPos pos)
     
    boolean
    place(net.minecraft.world.level.WorldGenLevel worldAccess, net.minecraft.world.level.block.state.BlockState[] states, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler)
     
    void
     
    void
    setRandom(net.minecraft.util.RandomSource random)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • ofRandom

      public static LayerPlacer ofRandom()
    • ofRandom

      public static LayerPlacer ofRandom(net.minecraft.util.RandomSource random)
    • of3DNoise

      public static LayerPlacer of3DNoise(FastNoiseLite noise)
    • of3DNoise

      public static LayerPlacer of3DNoise()
    • of2DNoise

      public static LayerPlacer of2DNoise(FastNoiseLite noise)
    • of2DNoise

      public static LayerPlacer of2DNoise()
    • ofOrder

      public static LayerPlacer ofOrder()
    • setNoise

      public void setNoise(FastNoiseLite noise)
    • setRandom

      public void setRandom(net.minecraft.util.RandomSource random)
    • place

      public boolean place(net.minecraft.world.level.WorldGenLevel worldAccess, List<net.minecraft.world.level.block.state.BlockState> states, net.minecraft.core.BlockPos pos)
    • place

      public boolean place(net.minecraft.world.level.WorldGenLevel worldAccess, net.minecraft.world.level.block.state.BlockState[] states, net.minecraft.core.BlockPos pos)
    • place

      public boolean place(net.minecraft.world.level.WorldGenLevel worldAccess, List<net.minecraft.world.level.block.state.BlockState> states, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler)
      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
    • place

      public boolean place(net.minecraft.world.level.WorldGenLevel worldAccess, net.minecraft.world.level.block.state.BlockState[] states, net.minecraft.core.BlockPos pos, StructurePlacementRuleManager ruler)
    • get

      public net.minecraft.world.level.block.state.BlockState get(List<net.minecraft.world.level.block.state.BlockState> states, net.minecraft.core.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
    • get

      public net.minecraft.world.level.block.state.BlockState get(net.minecraft.world.level.block.state.BlockState[] states, net.minecraft.core.BlockPos pos)