public class EntityHelper
extends java.lang.Object
Constructor and Description |
---|
EntityHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
addMotion(net.minecraft.entity.Entity entity,
EnumRotation axis,
double motion)
Sets the motion of an entity in a particular axis relative to the world.
|
static double |
getMotion(net.minecraft.entity.Entity entity,
EnumRotation axis)
Gets the motion of an entity in a particular axis relative to the world.
|
static <T extends net.minecraft.entity.Entity> |
getNearbyEntities(java.lang.Class<T> entityType,
net.minecraft.world.World world,
double x,
double y,
double z,
float radius) |
static net.minecraft.nbt.CompoundNBT |
getPersistentData(net.minecraft.entity.player.PlayerEntity player) |
static void |
setMotion(net.minecraft.entity.Entity entity,
double x,
double y,
double z)
Sets the motion of an entity in a particular axis relative to the world.
|
static void |
setMotion(net.minecraft.entity.Entity entity,
EnumRotation axis,
double motion)
Sets the motion of an entity in a particular axis relative to the world.
|
static void |
setPosition(net.minecraft.entity.Entity entity,
EnumRotation axis,
double position)
Sets the position of an entity in a particular axis relative to the world.
|
public static double getMotion(net.minecraft.entity.Entity entity, EnumRotation axis)
entity
- The entity to get motion for.axis
- The world axis to get motion for.public static void setMotion(net.minecraft.entity.Entity entity, EnumRotation axis, double motion)
entity
- The entity to set motion for.axis
- The world axis to get motion for.motion
- The value to set the motion to.public static void setMotion(net.minecraft.entity.Entity entity, double x, double y, double z)
entity
- The entity to set motion for.x
- X axis motion.y
- Y axis motion.z
- Z axis motion.public static void addMotion(net.minecraft.entity.Entity entity, EnumRotation axis, double motion)
entity
- The entity to get motion for.axis
- The world axis to get motion for.motion
- The value to set the motion to.public static void setPosition(net.minecraft.entity.Entity entity, EnumRotation axis, double position)
entity
- The entity to get position for.axis
- The world axis to get position for.position
- The value to set the position to.public static <T extends net.minecraft.entity.Entity> java.util.List<T> getNearbyEntities(java.lang.Class<T> entityType, net.minecraft.world.World world, double x, double y, double z, float radius)
public static net.minecraft.nbt.CompoundNBT getPersistentData(net.minecraft.entity.player.PlayerEntity player)