public class WorldHelpers
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
WorldHelpers.WorldFoldingFunction<F,T> |
| Modifier and Type | Field and Description |
|---|---|
static int |
CHUNK_SIZE
The maximum chunk size for X and Z axis.
|
| Constructor and Description |
|---|
WorldHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
efficientTick(net.minecraft.world.World world,
int baseModulus,
int... params)
Check if an efficient tick can happen.
|
static <T> T |
foldArea(net.minecraft.world.World world,
int area,
int x,
int y,
int z,
WorldHelpers.WorldFoldingFunction<T,T> folder,
T value)
Loop over a 3D area while accumulating a value.
|
static ILocation |
getChunkLocationFromWorldLocation(int x,
int y,
int z)
Get the chunk location (coordinates within one chunk.) from a world location.
|
static void |
setBiome(net.minecraft.world.World world,
int x,
int z,
net.minecraft.world.biome.BiomeGenBase biome)
Set the biome for the given coordinates.
|
public static final int CHUNK_SIZE
public static void setBiome(net.minecraft.world.World world,
int x,
int z,
net.minecraft.world.biome.BiomeGenBase biome)
world - The world.x - The X coordinate.z - The Z coordinate.biome - The biome to change to.public static boolean efficientTick(net.minecraft.world.World world,
int baseModulus,
int... params)
world - The world to tick in.baseModulus - The amount of ticks that could be skipped.params - Optional parameters to further vary the tick occurences.public static ILocation getChunkLocationFromWorldLocation(int x, int y, int z)
x - The world X.y - The world Y.z - The world Z.public static <T> T foldArea(net.minecraft.world.World world,
int area,
int x,
int y,
int z,
WorldHelpers.WorldFoldingFunction<T,T> folder,
T value)
T - The type of value to accumulate.world - The world.area - Radius.x - Xy - Yz - Zfolder - The folding function.value - The start value.