public class EntityUtils
extends java.lang.Object
Constructor and Description |
---|
EntityUtils() |
Modifier and Type | Method and Description |
---|---|
static net.minecraft.entity.player.EntityPlayerMP |
findPlayerFromUUID(java.util.UUID uuid)
Finds a player by its UUID.
|
static net.minecraftforge.common.util.ForgeDirection |
getEntityFacing(net.minecraft.entity.Entity entity)
Gets the
ForgeDirection the Entity is currently facing. |
static net.minecraftforge.common.util.ForgeDirection |
getEntityFacing(net.minecraft.entity.Entity entity,
boolean sixWays)
Gets the
ForgeDirection the Entity is currently facing. |
static boolean |
isEquipped(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.Item item) |
static boolean |
isEquipped(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack itemStack) |
static void |
spawnEjectedItem(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraft.item.ItemStack itemStack)
Eject a new item corresponding to the
ItemStack . |
public static void spawnEjectedItem(net.minecraft.world.World world, int x, int y, int z, net.minecraft.item.ItemStack itemStack)
ItemStack
.world
- the worldx
- the xy
- the yz
- the zitemStack
- the item stackpublic static net.minecraft.entity.player.EntityPlayerMP findPlayerFromUUID(java.util.UUID uuid)
uuid
- the uuidpublic static net.minecraftforge.common.util.ForgeDirection getEntityFacing(net.minecraft.entity.Entity entity)
ForgeDirection
the Entity
is currently facing.entity
- the entitypublic static net.minecraftforge.common.util.ForgeDirection getEntityFacing(net.minecraft.entity.Entity entity, boolean sixWays)
ForgeDirection
the Entity
is currently facing.true
, the direction can be UP
or DOWN
if the
entity is looking up or down.entity
- the entitysixWays
- whether to consider UP and DOWN for directionspublic static boolean isEquipped(net.minecraft.entity.player.EntityPlayer player, net.minecraft.item.Item item)
public static boolean isEquipped(net.minecraft.entity.player.EntityPlayer player, net.minecraft.item.ItemStack itemStack)