public class EntityUtils
extends java.lang.Object
| Constructor and Description |
|---|
EntityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addDestroyEffects(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.client.particle.ParticleManager particleManager,
net.minecraft.block.state.IBlockState... states)
Adds the destroy effects into the world for the specified
IBlockState. |
static void |
addHitEffects(net.minecraft.world.World world,
net.minecraft.util.math.RayTraceResult target,
net.minecraft.client.particle.ParticleManager particleManager,
net.minecraft.block.state.IBlockState... states)
Adds the hit effects into the world for the specified
IBlockState. |
static net.minecraft.entity.player.EntityPlayerMP |
findPlayerFromUUID(java.util.UUID uuid)
Finds a player by its UUID.
|
static net.minecraft.util.EnumFacing |
getEntityFacing(net.minecraft.entity.Entity entity)
Gets the
EnumFacing the Entity is currently facing. |
static net.minecraft.util.EnumFacing |
getEntityFacing(net.minecraft.entity.Entity entity,
boolean sixWays)
Gets the
EnumFacing the Entity is currently facing. |
static int |
getEntityRotation(net.minecraft.entity.Entity entity)
Gets the entity rotation based on where it's currently facing.
|
static int |
getEntityRotation(net.minecraft.entity.Entity entity,
boolean sixWays)
Gets the entity rotation based on where it's currently facing.
|
static java.util.List<net.minecraft.entity.player.EntityPlayerMP> |
getPlayersWatchingChunk(net.minecraft.world.chunk.Chunk chunk)
Gets the list of players currently watching the
Chunk. |
static java.util.List<net.minecraft.entity.player.EntityPlayerMP> |
getPlayersWatchingChunk(net.minecraft.world.WorldServer world,
int x,
int z)
Gets the list of players currently watching the chunk at the coordinate.
|
static Point |
getRenderViewOffset(float partialTick)
Gets the render view offset for the current view entity.
|
static boolean |
isEquipped(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.Item item,
net.minecraft.util.EnumHand hand)
Checks if is the
Item is equipped for the player. |
static boolean |
isEquipped(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumHand hand)
Checks if is the
Item contained in the ItemStack is equipped for the player. |
static void |
spawnEjectedItem(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.item.ItemStack itemStack)
Eject a new item corresponding to the
ItemStack. |
public static void spawnEjectedItem(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.item.ItemStack itemStack)
ItemStack.world - the worldpos - the positemStack - the item stackpublic static net.minecraft.entity.player.EntityPlayerMP findPlayerFromUUID(java.util.UUID uuid)
uuid - the uuidpublic static net.minecraft.util.EnumFacing getEntityFacing(net.minecraft.entity.Entity entity)
EnumFacing the Entity is currently facing.entity - the entitypublic static net.minecraft.util.EnumFacing getEntityFacing(net.minecraft.entity.Entity entity,
boolean sixWays)
EnumFacing 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 int getEntityRotation(net.minecraft.entity.Entity entity)
entity - the entitypublic static int getEntityRotation(net.minecraft.entity.Entity entity,
boolean sixWays)
entity - the entitysixWays - the six wayspublic static boolean isEquipped(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.Item item,
net.minecraft.util.EnumHand hand)
Item is equipped for the player.player - the playeritem - the itempublic static boolean isEquipped(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumHand hand)
Item contained in the ItemStack is equipped for the player.player - the playeritemStack - the item stackpublic static java.util.List<net.minecraft.entity.player.EntityPlayerMP> getPlayersWatchingChunk(net.minecraft.world.chunk.Chunk chunk)
Chunk.chunk - the chunkpublic static java.util.List<net.minecraft.entity.player.EntityPlayerMP> getPlayersWatchingChunk(net.minecraft.world.WorldServer world,
int x,
int z)
world - the worldx - the xz - the zpublic static Point getRenderViewOffset(float partialTick)
partialTick - the partial tickpublic static void addDestroyEffects(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.client.particle.ParticleManager particleManager,
net.minecraft.block.state.IBlockState... states)
IBlockState.world - the worldpos - the posparticleManager - the effect rendererstates - the statespublic static void addHitEffects(net.minecraft.world.World world,
net.minecraft.util.math.RayTraceResult target,
net.minecraft.client.particle.ParticleManager particleManager,
net.minecraft.block.state.IBlockState... states)
IBlockState.world - the worldtarget - the targetparticleManager - the effect rendererstates - the states