Beispiel #1
0
 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);
 }
Beispiel #2
0
 private static void AssertRotation(Rotation rotation)
 {
     Assert.IsNotNull(rotation);
     Assert.AreEqual(-11565.46, rotation.YawDegrees, 0.01);
     Assert.AreEqual(8.249827, rotation.PitchDegrees, 0.01);
 }