Class WorldGenUtil

java.lang.Object
net.rodofire.easierworldcreator.util.WorldGenUtil

public class WorldGenUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Set<net.minecraft.block.Block>
    addBlockStateListToBlockList(Set<net.minecraft.block.Block> block, List<net.minecraft.block.BlockState> state)
     
    static net.minecraft.util.math.ChunkPos
    addChunkPos(net.minecraft.util.math.ChunkPos pos1, int x, int z)
     
    static net.minecraft.util.math.ChunkPos
    addChunkPos(net.minecraft.util.math.ChunkPos pos1, net.minecraft.util.math.BlockPos pos2)
     
    static net.minecraft.util.math.ChunkPos
    addChunkPos(net.minecraft.util.math.ChunkPos pos1, net.minecraft.util.math.ChunkPos pos2)
     
    static double
    getAbs(net.minecraft.util.math.Vec3d pos)
     
    static int
    getBlockLayerDepth(List<BlockLayer> layers, int index)
     
    static int
    getBlockLayerDepth(List<BlockLayer> layers, int startIndex, int endIndex)
     
    static net.minecraft.util.math.Direction
    getDirection(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2)
     
    static float
    getDistance(int[] pos1, int[] pos2)
     
    static float
    getDistance(int x1, int y1, int z1, int[] pos2)
     
    static float
    getDistance(int x1, int y1, int z1, int x2, int y2, int z2)
     
    static float
    getDistance(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2)
     
    static float
    getDistance(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2, float precision)
     
    static float
    getDistance(net.minecraft.util.math.Vec3d pos1, net.minecraft.util.math.Vec3d pos2)
     
    static float
    getDistance(net.minecraft.util.math.Vec3d pos1, net.minecraft.util.math.Vec3d pos2, float precision)
     
    static double
    getDistanceFromPointToPlane(net.minecraft.util.math.Vec3d normal, net.minecraft.util.math.Vec3d pointOnPlane, net.minecraft.util.math.Vec3d point)
     
    static float
    getDistanceToAxis(net.minecraft.util.math.Vec3d centerPos, net.minecraft.util.math.Vec3d axisDir, net.minecraft.util.math.Vec3d pos)
     
    static double
    getExactDistance(net.minecraft.util.math.Vec3d pos)
     
    static net.minecraft.util.math.Direction
    method to get a random direction no matter the plane
    static net.minecraft.util.math.Direction
    getRandomDirection(net.minecraft.util.math.random.Random random)
    method to get a random direction no matter the plane
    static net.minecraft.util.math.Direction
    method to get a random direction on the horizontal axis
    static net.minecraft.util.math.Direction
    getRandomHorizontalDirection(net.minecraft.util.math.random.Random random)
    method to get a random direction on the horizontal axis
    static net.minecraft.util.math.Direction
    method to get a random direction on the vertical axis
    static net.minecraft.util.math.Direction
    getRandomVerticalDirection(net.minecraft.util.math.random.Random random)
    method to get a random direction on the vertical axis
    static int
    getSecondHeight(float chance, int maxHeight)
    return a random int between min height and max height if the chance
    static int
    getSecondHeight(float chance, int minHeight, int maxHeight)
    return a random int between min height and max height if the chance
    static double
    getSquared(net.minecraft.util.math.Vec3d pos)
     
    static int
     
    static boolean
    isBlockInBlockStateList(net.minecraft.block.Block block, List<net.minecraft.block.BlockState> state)
     
    static boolean
    isBlockStateInBlockStateList(net.minecraft.block.BlockState block, List<net.minecraft.block.BlockState> state)
     
    static boolean
    isPosAChunkFar(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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
    • getRandomDirection

      public static net.minecraft.util.math.Direction getRandomDirection(net.minecraft.util.math.random.Random random)
      method to get a random direction no matter the plane
      Returns:
      a random direction
    • getRandomVerticalDirection

      public static net.minecraft.util.math.Direction getRandomVerticalDirection(net.minecraft.util.math.random.Random random)
      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(net.minecraft.util.math.random.Random random)
      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 0
      maxHeight - 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 0
      minHeight - the minimum height that can be returned in the case the chance allowed a random height
      maxHeight - 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)
    • getAbs

      public static double getAbs(net.minecraft.util.math.Vec3d pos)
    • getSquared

      public static double getSquared(net.minecraft.util.math.Vec3d pos)
    • getDistance

      public static float getDistance(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2)
    • getDistance

      public static float getDistance(int x1, int y1, int z1, int x2, int y2, int z2)
    • getDistance

      public static float getDistance(int x1, int y1, int z1, int[] pos2)
    • getDistance

      public static float getDistance(int[] pos1, int[] 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

      public static Set<net.minecraft.block.Block> addBlockStateListToBlockList(Set<net.minecraft.block.Block> block, List<net.minecraft.block.BlockState> state)
    • getDistanceFromPointToPlane

      public static double getDistanceFromPointToPlane(net.minecraft.util.math.Vec3d normal, net.minecraft.util.math.Vec3d pointOnPlane, net.minecraft.util.math.Vec3d point)
    • getTotalBlockLayerDepth

      public static int getTotalBlockLayerDepth(List<BlockLayer> layers)
    • getBlockLayerDepth

      public static int getBlockLayerDepth(List<BlockLayer> layers, int index)
    • getBlockLayerDepth

      public static int getBlockLayerDepth(List<BlockLayer> layers, int startIndex, int endIndex)
    • getDirection

      public static net.minecraft.util.math.Direction getDirection(net.minecraft.util.math.BlockPos pos1, net.minecraft.util.math.BlockPos pos2)
    • addChunkPos

      public static net.minecraft.util.math.ChunkPos addChunkPos(net.minecraft.util.math.ChunkPos pos1, net.minecraft.util.math.ChunkPos pos2)
    • addChunkPos

      public static net.minecraft.util.math.ChunkPos addChunkPos(net.minecraft.util.math.ChunkPos pos1, int x, int z)
    • addChunkPos

      public static net.minecraft.util.math.ChunkPos addChunkPos(net.minecraft.util.math.ChunkPos pos1, net.minecraft.util.math.BlockPos pos2)
    • getDistanceToAxis

      public static float getDistanceToAxis(net.minecraft.util.math.Vec3d centerPos, net.minecraft.util.math.Vec3d axisDir, net.minecraft.util.math.Vec3d pos)
    • getExactDistance

      public static double getExactDistance(net.minecraft.util.math.Vec3d pos)