Class ShapePlacer

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

public class ShapePlacer extends Object
Class that allow you to place a structure based on a coordinate map or a BlockListManager. It takes ShapePlacer.PlaceMoment argument which define when should the structure be placed. Different behaviors will happen depending on it. Since that placement is different depending on the moment where the shape is being placed, we have to use the enum.
  • Constructor Details

    • ShapePlacer

      public ShapePlacer(net.minecraft.world.level.WorldGenLevel world, ShapePlacer.PlaceMoment placeMoment, net.minecraft.core.BlockPos center)
    • ShapePlacer

      public ShapePlacer(net.minecraft.world.level.WorldGenLevel world, ShapePlacer.PlaceMoment placeMoment, net.minecraft.core.BlockPos center, net.minecraft.resources.ResourceLocation featureName)
    • ShapePlacer

      public ShapePlacer(net.minecraft.world.level.WorldGenLevel world, ShapePlacer.PlaceMoment placeMoment, WGShapeData shapeData, net.minecraft.core.BlockPos center)
    • ShapePlacer

      public ShapePlacer(net.minecraft.world.level.WorldGenLevel world, ShapePlacer.PlaceMoment placeMoment, WGShapeData shapeData, net.minecraft.core.BlockPos center, net.minecraft.resources.ResourceLocation featureName)
  • Method Details

    • getFeatureName

      public net.minecraft.resources.ResourceLocation getFeatureName()
    • setFeatureName

      public void setFeatureName(net.minecraft.resources.ResourceLocation featureName)
    • getPlaceMoment

      public ShapePlacer.PlaceMoment getPlaceMoment()
    • setShapeData

      public void setShapeData(WGShapeData shapeData)
    • place

      public void place(BlockListManager defaultManager)
      Place the shape from a blockListManager. The place moment ShapePlacer.PlaceMoment.WORLD_GEN should not be used. Use instead place(DividedBlockListManager).
      Parameters:
      defaultManager - the manager that will be placed
    • place

      public void place(Map<net.minecraft.world.level.ChunkPos,it.unimi.dsi.fastutil.longs.LongOpenHashSet> posLit, LayerManager manager)
    • place

      public void place(DividedBlockListManager manager)