public class WorldHelper
extends java.lang.Object
Constructor and Description |
---|
WorldHelper() |
Modifier and Type | Method and Description |
---|---|
static java.util.Optional<net.minecraft.world.World> |
findLevel(java.lang.String name)
Gets the world by name
|
static <T extends net.minecraft.entity.Entity> |
getEntityByUUID(net.minecraft.world.server.ServerWorld world,
java.util.UUID uuid,
java.lang.Class<T> clazz) |
static int |
getWaterDepth(net.minecraft.util.math.BlockPos pos,
net.minecraft.world.World worldObj)
Finds the depth of water starting from the given position.
|
static boolean |
insideStructure(net.minecraft.world.server.ServerWorld world,
java.lang.String structure,
net.minecraft.util.math.BlockPos pos) |
static void |
onLoad(net.minecraftforge.event.world.ChunkEvent.Load event) |
static void |
onUnload(net.minecraftforge.event.world.ChunkEvent.Unload event) |
static net.minecraft.util.math.RayTraceResult |
rayTraceEyes(net.minecraft.entity.LivingEntity entity,
double length) |
static void |
spawnRedstoneParticle(net.minecraft.world.World world,
double posX,
double posY,
double posZ,
double r,
double g,
double b)
Spawns PARTICLES for redstone
|
public static java.util.Optional<net.minecraft.world.World> findLevel(java.lang.String name)
name
- The name of the worldpublic static <T extends net.minecraft.entity.Entity> T getEntityByUUID(net.minecraft.world.server.ServerWorld world, java.util.UUID uuid, java.lang.Class<T> clazz)
public static int getWaterDepth(net.minecraft.util.math.BlockPos pos, net.minecraft.world.World worldObj)
pos
- The position of the water block to start at.worldObj
- The world that the water block is in.public static void spawnRedstoneParticle(net.minecraft.world.World world, double posX, double posY, double posZ, double r, double g, double b)
world
- The world particles are appearing inposX
- The x posposY
- The y posposZ
- The z posr
- The red valueg
- The green valueb
- The blue value@Nullable public static net.minecraft.util.math.RayTraceResult rayTraceEyes(net.minecraft.entity.LivingEntity entity, double length)
public static boolean insideStructure(net.minecraft.world.server.ServerWorld world, java.lang.String structure, net.minecraft.util.math.BlockPos pos)
public static void onLoad(net.minecraftforge.event.world.ChunkEvent.Load event)
public static void onUnload(net.minecraftforge.event.world.ChunkEvent.Unload event)