public void LoadFromTag(CompoundTag tag) { Motion = new Motion(tag.GetListTag(Motion.MOTION)); OnGround = tag.GetByte(ON_GROUND); HurtTime = tag.GetShort(HURT_TIME); Health = tag.GetShort(HEALTH); Dimension = tag.GetInt(DIMENSION); Air = tag.GetShort(AIR); Inventory = new Inventory(tag.GetListTag(Inventory.INVENTORY)); Pos = new Pos(tag.GetListTag(Pos.POS)); AttackTime = tag.GetShort(ATTACK_TIME); Fire = tag.GetShort(FIRE); FallDistance = tag.GetFloat(FALL_DISTANCE); Rotation = new Rotation(tag.GetListTag(Rotation.ROTATION)); Score = tag.GetInt(SCORE); DeathTime = tag.GetShort(DEATH_TIME); }
private void AssertMotion(Motion motion) { Assert.IsNotNull(motion); Assert.AreEqual(3.61053074341395E-07, motion.DX, 0.00000001); Assert.AreEqual(-0.0784000015258789, motion.DY, 0.00000001); Assert.AreEqual(-1.43072612962421E-08, motion.DZ, 0.00000001); }