Class ShapePlacer
java.lang.Object
fr.rodofire.ewc.shape.block.placer.ShapePlacer
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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum that define the moment of structure placing. -
Constructor Summary
ConstructorsConstructorDescriptionShapePlacer(net.minecraft.world.level.WorldGenLevel world, ShapePlacer.PlaceMoment placeMoment, WGShapeData shapeData, net.minecraft.core.BlockPos center) ShapePlacer(net.minecraft.world.level.WorldGenLevel world, ShapePlacer.PlaceMoment placeMoment, WGShapeData shapeData, net.minecraft.core.BlockPos center, net.minecraft.resources.ResourceLocation featureName) ShapePlacer(net.minecraft.world.level.WorldGenLevel world, ShapePlacer.PlaceMoment placeMoment, net.minecraft.core.BlockPos center) ShapePlacer(net.minecraft.world.level.WorldGenLevel world, ShapePlacer.PlaceMoment placeMoment, net.minecraft.core.BlockPos center, net.minecraft.resources.ResourceLocation featureName) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationvoidplace(BlockListManager defaultManager) Place the shape from a blockListManager.voidplace(DividedBlockListManager manager) voidplace(Map<net.minecraft.world.level.ChunkPos, it.unimi.dsi.fastutil.longs.LongOpenHashSet> posLit, LayerManager manager) voidsetFeatureName(net.minecraft.resources.ResourceLocation featureName) voidsetShapeData(WGShapeData shapeData)
-
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
-
setShapeData
-
place
Place the shape from a blockListManager. The place momentShapePlacer.PlaceMoment.WORLD_GENshould not be used. Use insteadplace(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
-