Esempio n. 1
0
 public void LoadFromTag(CompoundTag tag)
 {
     Time = tag.GetLong(TIME);
     LastPlayed = tag.GetLong(LAST_PLAYED);
     Player = new Player(tag.GetCompoundTag(Player.PLAYER));
     SpawnX = tag.GetInt(SPAWN_X);
     SpawnY = tag.GetInt(SPAWN_Y);
     SpawnZ = tag.GetInt(SPAWN_Z);
     SizeOnDisk = tag.GetLong(SIZE_ON_DISK);
     RandomSeed = tag.GetLong(RANDOM_SEED);
 }
Esempio n. 2
0
        private void AssertPlayer(Player player)
        {
            Assert.IsNotNull(player);

            Assert.AreEqual(1, player.OnGround);
            Assert.AreEqual(0, player.HurtTime);
            Assert.AreEqual(20, player.Health);
            Assert.AreEqual(0, player.Dimension);
            Assert.AreEqual(300, player.Air);
            Assert.AreEqual(0, player.AttackTime);
            Assert.AreEqual(-20, player.Fire);
            Assert.AreEqual(0, player.FallDistance);
            Assert.AreEqual(0, player.Score);
            Assert.AreEqual(0, player.DeathTime);

            AssertPos(player.Pos);
            AssertRotation(player.Rotation);
            AssertMotion(player.Motion);
            AssertInventory(player.Inventory);
        }