Class Shape
java.lang.Object
net.rodofire.easierworldcreator.shapeutil.Shape
- Direct Known Subclasses:
FillableShape,LineGen,SpiralGen
class to create custom shapes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumset how the blocks/particles will be chosen inside a layerstatic enumchange how the blocks are putstatic enumset the type of objects that will be placed -
Constructor Summary
ConstructorsConstructorDescriptionShape(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos) init the shape genShape(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, List<BlockLayer> layers, boolean force, List<net.minecraft.block.Block> blocksToForce, int xrotation, int yrotation, int secondxrotation) init the shape gen -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlockLayer(BlockLayer blockLayer) voidaddBlockLayers(List<BlockLayer> blockLayers) voidaddBlocksToForce(List<net.minecraft.block.Block> blocks) voidaddBlocksToForce(net.minecraft.block.Block block) voidaddPosOffset(net.minecraft.util.math.BlockPos pos1) voidaddSecondxrotation(int secondxrotation) voidaddXrotation(int xrotation) voidaddYrotation(int yrotation) getBlockLayer(int index) abstract List<net.minecraft.util.math.BlockPos> List<net.minecraft.block.Block> net.minecraft.util.math.BlockPosgetCoordinatesRotation(float x, float y, float z, net.minecraft.util.math.BlockPos pos) net.minecraft.util.math.BlockPosgetCoordinatesRotation(net.minecraft.util.math.Vec3d pos, net.minecraft.util.math.BlockPos centerPos) List<net.minecraft.util.math.BlockPos> getCoordinatesRotationList(List<net.minecraft.util.math.Vec3d> poslist, net.minecraft.util.math.BlockPos centerPos) booleangetForce()voidgetGenTime(long startTime, boolean place) getNoise()net.minecraft.util.math.BlockPosgetPos()voidgetRotations(int xrotation, int yrotation, int secondxrotation) intabstract List<net.minecraft.util.math.Vec3d> getVec3d()net.minecraft.world.StructureWorldAccessgetWorld()intintvoidplace()voidplaceBlocks(int index, net.minecraft.util.math.BlockPos pos) voidplaceBlocks(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) booleanplaceBlocksWithVerification(int index, net.minecraft.util.math.BlockPos pos) booleanplaceBlocksWithVerification(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) voidplaceCylindricalBlocks(List<net.minecraft.util.math.BlockPos> posList) List<net.minecraft.util.math.BlockPos> placeFirstSurfaceBlockLayers(List<net.minecraft.util.math.BlockPos> firstposlist) voidplaceLayers(List<net.minecraft.util.math.BlockPos> firstposlist) place the layers of the structure starting from the first layer to the second to the thirdvoidplaceRadialBlocks(List<net.minecraft.util.math.BlockPos> posList) placeSurfaceBlockLayers(List<net.minecraft.util.math.BlockPos> poslist, int layerIndex) voidremoveBlockLayer(int index) voidremoveBlockLayer(List<BlockLayer> blockLayers) voidremoveBlockLayer(BlockLayer blockLayer) voidsetBlockLayers(List<BlockLayer> blockLayers) voidsetBlockLayers(BlockLayer... layers) voidsetBlocksToForce(List<net.minecraft.block.Block> blocksToForce) voidsetForce(boolean force) voidsetLayerDirection(net.minecraft.util.math.Vec3d vect) voidsetLayerPlace(Shape.LayerPlace layerPlace) voidsetLayersType(Shape.LayersType layersType) voidsetNoise(FastNoiseLite noise) voidsetPlaceType(Shape.PlaceType placeType) voidsetPos(net.minecraft.util.math.BlockPos pos) voidsetSecondxrotation(int secondxrotation) voidsetXrotation(int xrotation) voidsetYrotation(int yrotation) booleanverifyBlocks(net.minecraft.util.math.BlockPos pos)
-
Constructor Details
-
Shape
public Shape(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, List<BlockLayer> layers, boolean force, List<net.minecraft.block.Block> blocksToForce, int xrotation, int yrotation, int secondxrotation) init the shape gen- Parameters:
world- the world the shape will be generatedpos- the pos of the structure center -------------------------------------------------------------------------------------layers- a list of layers that will be placed by the structureforce- force the blockPos if true (be careful if true, your structure will replace every block, you might destruct some constructions if it is bad used)blocksToForce- list of blocks that the structure can still replace if @param force = false
-
Shape
public Shape(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos) init the shape gen- Parameters:
world- the world the shape will be generatedpos- the pos of the structure center
-
-
Method Details
-
getRotations
public void getRotations(int xrotation, int yrotation, int secondxrotation) -
getLayersType
-
setLayersType
-
setLayerDirection
public void setLayerDirection(net.minecraft.util.math.Vec3d vect) -
getForce
public boolean getForce() -
setForce
public void setForce(boolean force) -
setLayerPlace
-
getLayerPlace
-
getBlocksToForce
-
setBlocksToForce
-
addBlocksToForce
public void addBlocksToForce(net.minecraft.block.Block block) -
addBlocksToForce
-
getXrotation
public int getXrotation() -
setXrotation
public void setXrotation(int xrotation) -
getYrotation
public int getYrotation() -
setYrotation
public void setYrotation(int yrotation) -
getSecondXrotation
public int getSecondXrotation() -
setSecondxrotation
public void setSecondxrotation(int secondxrotation) -
addXrotation
public void addXrotation(int xrotation) -
addYrotation
public void addYrotation(int yrotation) -
addSecondxrotation
public void addSecondxrotation(int secondxrotation) -
getPos
public net.minecraft.util.math.BlockPos getPos() -
setPos
public void setPos(net.minecraft.util.math.BlockPos pos) -
addPosOffset
public void addPosOffset(net.minecraft.util.math.BlockPos pos1) -
getWorld
public net.minecraft.world.StructureWorldAccess getWorld() -
addBlockLayers
-
addBlockLayer
-
removeBlockLayer
-
removeBlockLayer
-
removeBlockLayer
public void removeBlockLayer(int index) -
getBlockLayers
-
setBlockLayers
-
setBlockLayers
-
getBlockLayer
-
getPlaceType
-
setNoise
-
getNoise
-
setPlaceType
-
place
public void place() -
getBlockPos
-
getVec3d
-
placeLayers
place the layers of the structure starting from the first layer to the second to the third- Parameters:
firstposlist- list of BlockPos of the structure
-
placeFirstSurfaceBlockLayers
-
placeSurfaceBlockLayers
-
placeCylindricalBlocks
-
placeRadialBlocks
-
getCoordinatesRotation
public net.minecraft.util.math.BlockPos getCoordinatesRotation(net.minecraft.util.math.Vec3d pos, net.minecraft.util.math.BlockPos centerPos) -
getCoordinatesRotation
public net.minecraft.util.math.BlockPos getCoordinatesRotation(float x, float y, float z, net.minecraft.util.math.BlockPos pos) -
getCoordinatesRotationList
-
getGenTime
public void getGenTime(long startTime, boolean place) -
placeBlocks
public void placeBlocks(int index, net.minecraft.util.math.BlockPos pos) -
placeBlocks
public void placeBlocks(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) -
placeBlocksWithVerification
public boolean placeBlocksWithVerification(int index, net.minecraft.util.math.BlockPos pos) -
placeBlocksWithVerification
public boolean placeBlocksWithVerification(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) -
verifyBlocks
public boolean verifyBlocks(net.minecraft.util.math.BlockPos pos)
-