EntityFireball.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:RuneCraftery 作者:
/**
 * (abstract) Protected helper method to read subclass entity data from NBT.
 */
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
    this.xTile = par1NBTTagCompound.getShort("xTile");
    this.yTile = par1NBTTagCompound.getShort("yTile");
    this.zTile = par1NBTTagCompound.getShort("zTile");
    this.inTile = par1NBTTagCompound.getByte("inTile") & 255;
    this.inGround = par1NBTTagCompound.getByte("inGround") == 1;

    if (par1NBTTagCompound.hasKey("direction"))
    {
        NBTTagList nbttaglist = par1NBTTagCompound.getTagList("direction");
        this.motionX = ((NBTTagDouble)nbttaglist.tagAt(0)).data;
        this.motionY = ((NBTTagDouble)nbttaglist.tagAt(1)).data;
        this.motionZ = ((NBTTagDouble)nbttaglist.tagAt(2)).data;
    }
    else
    {
        this.setDead();
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号