java.lang.Object
net.rodofire.easierworldcreator.shapeutil.Shape
Direct Known Subclasses:
FillableShape, LineGen, SpiralGen

public abstract class Shape extends Object
class to create custom shapes
  • 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 generated
      pos - the pos of the structure center -------------------------------------------------------------------------------------
      layers - a list of layers that will be placed by the structure
      force - 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 generated
      pos - the pos of the structure center
  • Method Details

    • getRotations

      public void getRotations(int xrotation, int yrotation, int secondxrotation)
    • getLayersType

      public Shape.LayersType getLayersType()
    • setLayersType

      public void setLayersType(Shape.LayersType layersType)
    • setLayerDirection

      public void setLayerDirection(net.minecraft.util.math.Vec3d vect)
    • getForce

      public boolean getForce()
    • setForce

      public void setForce(boolean force)
    • setLayerPlace

      public void setLayerPlace(Shape.LayerPlace layerPlace)
    • getLayerPlace

      public Shape.LayerPlace getLayerPlace()
    • getBlocksToForce

      public List<net.minecraft.block.Block> getBlocksToForce()
    • setBlocksToForce

      public void setBlocksToForce(List<net.minecraft.block.Block> blocksToForce)
    • addBlocksToForce

      public void addBlocksToForce(net.minecraft.block.Block block)
    • addBlocksToForce

      public void addBlocksToForce(List<net.minecraft.block.Block> blocks)
    • 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

      public void addBlockLayers(List<BlockLayer> blockLayers)
    • addBlockLayer

      public void addBlockLayer(BlockLayer blockLayer)
    • removeBlockLayer

      public void removeBlockLayer(List<BlockLayer> blockLayers)
    • removeBlockLayer

      public void removeBlockLayer(BlockLayer blockLayer)
    • removeBlockLayer

      public void removeBlockLayer(int index)
    • getBlockLayers

      public List<BlockLayer> getBlockLayers()
    • setBlockLayers

      public void setBlockLayers(List<BlockLayer> blockLayers)
    • setBlockLayers

      public void setBlockLayers(BlockLayer... layers)
    • getBlockLayer

      public BlockLayer getBlockLayer(int index)
    • getPlaceType

      public Shape.PlaceType getPlaceType()
    • setNoise

      public void setNoise(FastNoiseLite noise)
    • getNoise

      public FastNoiseLite getNoise()
    • setPlaceType

      public void setPlaceType(Shape.PlaceType placeType)
    • place

      public void place()
    • getBlockPos

      public abstract List<net.minecraft.util.math.BlockPos> getBlockPos()
    • getVec3d

      public abstract List<net.minecraft.util.math.Vec3d> getVec3d()
    • placeLayers

      public void placeLayers(List<net.minecraft.util.math.BlockPos> firstposlist)
      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

      public List<net.minecraft.util.math.BlockPos> placeFirstSurfaceBlockLayers(List<net.minecraft.util.math.BlockPos> firstposlist)
    • placeSurfaceBlockLayers

      public List<List<net.minecraft.util.math.BlockPos>> placeSurfaceBlockLayers(List<net.minecraft.util.math.BlockPos> poslist, int layerIndex)
    • placeCylindricalBlocks

      public void placeCylindricalBlocks(List<net.minecraft.util.math.BlockPos> posList)
    • placeRadialBlocks

      public void placeRadialBlocks(List<net.minecraft.util.math.BlockPos> posList)
    • 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

      public List<net.minecraft.util.math.BlockPos> getCoordinatesRotationList(List<net.minecraft.util.math.Vec3d> poslist, net.minecraft.util.math.BlockPos centerPos)
    • 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)