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 static void AssertPos(Pos pos) { Assert.IsNotNull(pos); Assert.AreEqual(292.952445946266, pos.X, 0.000000001); Assert.AreEqual(78.6200000047684, pos.Y, 0.000000001); Assert.AreEqual(364.287147669336, pos.Z, 0.000000001); }