本文整理汇总了Java中net.minecraft.entity.EntityList.getEntityID方法的典型用法代码示例。如果您正苦于以下问题:Java EntityList.getEntityID方法的具体用法?Java EntityList.getEntityID怎么用?Java EntityList.getEntityID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.EntityList
的用法示例。
在下文中一共展示了EntityList.getEntityID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setEntityId
import net.minecraft.entity.EntityList; //导入方法依赖的package包/类
public static void setEntityId(Entity entity)
{
if (isRenderingWorld && !isShadowPass && uniformEntityId.isDefined())
{
int i = EntityList.getEntityID(entity);
uniformEntityId.setValue(i);
}
}
示例2: S0FPacketSpawnMob
import net.minecraft.entity.EntityList; //导入方法依赖的package包/类
public S0FPacketSpawnMob(EntityLivingBase entityIn)
{
this.entityId = entityIn.getEntityId();
this.type = (byte)EntityList.getEntityID(entityIn);
this.x = MathHelper.floor_double(entityIn.posX * 32.0D);
this.y = MathHelper.floor_double(entityIn.posY * 32.0D);
this.z = MathHelper.floor_double(entityIn.posZ * 32.0D);
this.yaw = (byte)((int)(entityIn.rotationYaw * 256.0F / 360.0F));
this.pitch = (byte)((int)(entityIn.rotationPitch * 256.0F / 360.0F));
this.headPitch = (byte)((int)(entityIn.rotationYawHead * 256.0F / 360.0F));
double d0 = 3.9D;
double d1 = entityIn.motionX;
double d2 = entityIn.motionY;
double d3 = entityIn.motionZ;
if (d1 < -d0)
{
d1 = -d0;
}
if (d2 < -d0)
{
d2 = -d0;
}
if (d3 < -d0)
{
d3 = -d0;
}
if (d1 > d0)
{
d1 = d0;
}
if (d2 > d0)
{
d2 = d0;
}
if (d3 > d0)
{
d3 = d0;
}
this.velocityX = (int)(d1 * 8000.0D);
this.velocityY = (int)(d2 * 8000.0D);
this.velocityZ = (int)(d3 * 8000.0D);
this.field_149043_l = entityIn.getDataWatcher();
}
示例3: SPacketSpawnMob
import net.minecraft.entity.EntityList; //导入方法依赖的package包/类
public SPacketSpawnMob(EntityLivingBase entityIn)
{
this.entityId = entityIn.getEntityId();
this.uniqueId = entityIn.getUniqueID();
this.type = (byte)EntityList.getEntityID(entityIn);
this.x = entityIn.posX;
this.y = entityIn.posY;
this.z = entityIn.posZ;
this.yaw = (byte)((int)(entityIn.rotationYaw * 256.0F / 360.0F));
this.pitch = (byte)((int)(entityIn.rotationPitch * 256.0F / 360.0F));
this.headPitch = (byte)((int)(entityIn.rotationYawHead * 256.0F / 360.0F));
double d0 = 3.9D;
double d1 = entityIn.motionX;
double d2 = entityIn.motionY;
double d3 = entityIn.motionZ;
if (d1 < -3.9D)
{
d1 = -3.9D;
}
if (d2 < -3.9D)
{
d2 = -3.9D;
}
if (d3 < -3.9D)
{
d3 = -3.9D;
}
if (d1 > 3.9D)
{
d1 = 3.9D;
}
if (d2 > 3.9D)
{
d2 = 3.9D;
}
if (d3 > 3.9D)
{
d3 = 3.9D;
}
this.velocityX = (int)(d1 * 8000.0D);
this.velocityY = (int)(d2 * 8000.0D);
this.velocityZ = (int)(d3 * 8000.0D);
this.dataManager = entityIn.getDataManager();
}