Class WorldGenUtil
java.lang.Object
net.rodofire.easierworldcreator.util.WorldGenUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<net.minecraft.block.Block> addBlockStateListToBlockList(Set<net.minecraft.block.Block> block, List<net.minecraft.block.BlockState> state) divideBlockPosIntoChunk(List<net.minecraft.util.math.BlockPos> posList) This method allows 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 floatgetDistance(net.minecraft.util.math.Vec3d pos1, net.minecraft.util.math.Vec3d pos2) static floatgetDistance(net.minecraft.util.math.Vec3d pos1, net.minecraft.util.math.Vec3d pos2, float precision) static floatgetDistanceFromPointToPlane(net.minecraft.util.math.Vec3d normal, net.minecraft.util.math.Vec3d pointOnPlane, net.minecraft.util.math.Vec3d point) static net.minecraft.util.math.Directionmethod to get a random direction no matter the planestatic net.minecraft.util.math.Directionmethod to get a random direction on the horizontal axisstatic net.minecraft.util.math.Directionmethod to get a random direction on the vertical axisstatic intgetSecondHeight(float chance, int maxHeight) return a random int between min height and max height if the chancestatic intgetSecondHeight(float chance, int minHeight, int maxHeight) return a random int between min height and max height if the chancestatic 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 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()method to get a random direction no matter the plane- Returns:
- a random direction
-
getRandomVerticalDirection
public static net.minecraft.util.math.Direction getRandomVerticalDirection()method to get a random direction on the vertical axis- Returns:
- a random direction on the vertical axis
-
getRandomHorizontalDirection
public static net.minecraft.util.math.Direction getRandomHorizontalDirection()method to get a random direction on the horizontal axis- Returns:
- a random direction on the horizontal axis
-
getSecondHeight
public static int getSecondHeight(float chance, int maxHeight) return a random int between min height and max height if the chance- Parameters:
chance- the chance at which the result won't be equal to 0maxHeight- the maximum height that can be returned- Returns:
- a random height
-
getSecondHeight
public static int getSecondHeight(float chance, int minHeight, int maxHeight) return a random int between min height and max height if the chance- Parameters:
chance- the chance at which the result won't be equal to 0minHeight- the minimum height that can be returned in the case the chance allowed a random heightmaxHeight- the maximum height that can be returned- Returns:
- a random height
-
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) -
getDistance
public static float getDistance(net.minecraft.util.math.Vec3d pos1, net.minecraft.util.math.Vec3d pos2) -
getDistance
public static float getDistance(net.minecraft.util.math.Vec3d pos1, net.minecraft.util.math.Vec3d 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<Set<net.minecraft.util.math.BlockPos>> divideBlockPosIntoChunk(List<net.minecraft.util.math.BlockPos> posList) This method allows you to divide a list of blockPos into chunks. It is used later to put the blocks- Parameters:
posList- the list of BlockPos that will be divided- Returns:
- a list of set of BlockPos that represents a list of chunks
-
modifyChunkMap
-