本文整理匯總了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();
}