Class WorldGenUtil
java.lang.Object
net.rodofire.easierworldcreator.worldgenutil.WorldGenUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<net.minecraft.block.Block> addBlockStateListtoBlockList(List<net.minecraft.block.Block> block, List<net.minecraft.block.BlockState> state) divideBlockPosIntoChunk(List<net.minecraft.util.math.BlockPos> posList) This methods allow you to divide a list of blockPos into chunks.static intgetBlockLayerDepth(List<BlockLayer> layers, int index) static intgetBlockLayerDepth(List<BlockLayer> layers, int startindex, int endindex) static net.minecraft.util.math.BlockPosgetCoordinatesRotation(float x, float y, float z, double cosx, double sinx, double cosy, double siny, double cosx2, double sinx2, net.minecraft.util.math.BlockPos pos) static net.minecraft.util.math.BlockPosgetCoordinatesRotation(float x, float y, float z, int rotationx, int rotationy, int secondrotationx, net.minecraft.util.math.BlockPos pos) static net.minecraft.util.math.BlockPosgetCoordinatesRotation(float x, float y, float z, int rotationx, int rotationy, net.minecraft.util.math.BlockPos pos) static net.minecraft.util.math.DirectiongetDirection(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2) static floatgetDistance(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2) static floatgetDistance(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2, float precision) static floatgetDistanceFromPointToPlane(net.minecraft.util.math.Vec3d normal, net.minecraft.util.math.Vec3d pointOnPlane, net.minecraft.util.math.Vec3d point) static booleangetRandomBoolean(float chance) static net.minecraft.util.math.Directionstatic net.minecraft.util.math.Directionstatic intstatic net.minecraft.util.math.Directionstatic intgetSecondHeight(float chance, int maxheight) static intgetSecondHeight(float chance, int minheight, int maxheight) static intgetSign(double a) static intgetSign(float a) static intgetSign(int a) static intgetTotalBlockLayerDepth(List<BlockLayer> layers) static booleanisBlockInBlockStateList(net.minecraft.block.Block block, List<net.minecraft.block.BlockState> state) static booleanisBlockStateInBlockStateList(net.minecraft.block.BlockState block, List<net.minecraft.block.BlockState> state) static booleanisChunkGenerated(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.ChunkPos chunkPos) Method to verify if a chunk has been generated.static booleanisPosAChunkFar(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2) static voidmodifyChunkMap(net.minecraft.util.math.BlockPos pos, Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap)
-
Constructor Details
-
WorldGenUtil
public WorldGenUtil()
-
-
Method Details
-
getRandomDirection
public static net.minecraft.util.math.Direction getRandomDirection() -
getRandomVerticalDirection
public static net.minecraft.util.math.Direction getRandomVerticalDirection() -
getRandomHorizontalDirection
public static net.minecraft.util.math.Direction getRandomHorizontalDirection() -
getRandomOpposite
public static int getRandomOpposite() -
getRandomBoolean
public static boolean getRandomBoolean(float chance) -
getSign
public static int getSign(int a) -
getSign
public static int getSign(double a) -
getSign
public static int getSign(float a) -
getSecondHeight
public static int getSecondHeight(float chance, int maxheight) -
getSecondHeight
public static int getSecondHeight(float chance, int minheight, int maxheight) -
isBlockInBlockStateList
public static boolean isBlockInBlockStateList(net.minecraft.block.Block block, List<net.minecraft.block.BlockState> state) -
isBlockStateInBlockStateList
public static boolean isBlockStateInBlockStateList(net.minecraft.block.BlockState block, List<net.minecraft.block.BlockState> state) -
getDistance
public static float getDistance(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2) -
getDistance
public static float getDistance(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2, float precision) -
isPosAChunkFar
public static boolean isPosAChunkFar(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2) -
addBlockStateListtoBlockList
-
getDistanceFromPointToPlane
public static float getDistanceFromPointToPlane(net.minecraft.util.math.Vec3d normal, net.minecraft.util.math.Vec3d pointOnPlane, net.minecraft.util.math.Vec3d point) -
getTotalBlockLayerDepth
-
getBlockLayerDepth
-
getBlockLayerDepth
-
getDirection
public static net.minecraft.util.math.Direction getDirection(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2) -
getCoordinatesRotation
public static net.minecraft.util.math.BlockPos getCoordinatesRotation(float x, float y, float z, int rotationx, int rotationy, net.minecraft.util.math.BlockPos pos) -
getCoordinatesRotation
public static net.minecraft.util.math.BlockPos getCoordinatesRotation(float x, float y, float z, int rotationx, int rotationy, int secondrotationx, net.minecraft.util.math.BlockPos pos) -
getCoordinatesRotation
public static net.minecraft.util.math.BlockPos getCoordinatesRotation(float x, float y, float z, double cosx, double sinx, double cosy, double siny, double cosx2, double sinx2, net.minecraft.util.math.BlockPos pos) -
divideBlockPosIntoChunk
public static List<List<net.minecraft.util.math.BlockPos>> divideBlockPosIntoChunk(List<net.minecraft.util.math.BlockPos> posList) This methods allow you to divide a list of blockPos into chunks. It is used later to put the blocks- Parameters:
posList-- Returns:
-
modifyChunkMap
-
isChunkGenerated
public static boolean isChunkGenerated(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.math.ChunkPos chunkPos) Method to verify if a chunk has been generated. This method could be useful for generating multi chunk shapes- Parameters:
world- the world of the chunkchunkPos- the pos of the chunk- Returns:
- a
Booleanthat says if the chunk was generated
-