Exemplo n.º 1
0
        public override CompoundTag SaveNBT()
        {
            CompoundTag nbt = base.SaveNBT();

            Dictionary <string, Tag> tags = this.PlayerCursorInventory.SaveNBT().Tags;

            foreach (string key in tags.Keys)
            {
                nbt.PutTag(key, tags[key]);
            }
            tags = this.PlayerEnderChestInventory.SaveNBT().Tags;
            foreach (string key in tags.Keys)
            {
                nbt.PutTag(key, tags[key]);
            }
            return(nbt);
        }
Exemplo n.º 2
0
        public override CompoundTag SaveNBT()
        {
            CompoundTag nbt = base.SaveNBT();

            nbt.PutInt("MainHand", this.MainHandSlot);

            Dictionary <string, Tag> tags = this.ArmorInventory.SaveNBT().Tags;

            foreach (string key in tags.Keys)
            {
                nbt.PutTag(key, tags[key]);
            }
            tags = this.EntityOffhandInventory.SaveNBT().Tags;
            foreach (string key in tags.Keys)
            {
                nbt.PutTag(key, tags[key]);
            }
            return(nbt);
        }
Exemplo n.º 3
0
        public override CompoundTag SaveNBT()
        {
            CompoundTag nbt   = base.SaveNBT();
            CompoundTag items = this.Inventory.SaveNBT();

            foreach (string name in items.Tags.Keys)
            {
                Tag tag = items.GetTag(name);
                nbt.PutTag(name, tag);
            }
            return(nbt);
        }
Exemplo n.º 4
0
        public void Save()
        {
            CompoundTag nbt = this.SaveNBT();

            nbt.PutInt("PlayerGameType", this.GameMode.GetIndex());

            nbt.PutString("World", this.World.Name);

            nbt.PutInt("SpawnX", this.SpawnX);
            nbt.PutInt("SpawnY", this.SpawnY);
            nbt.PutInt("SpawnZ", this.SpawnZ);

            Dictionary <string, Tag> tags = this.Inventory.SaveNBT().Tags;

            foreach (string name in tags.Keys)
            {
                nbt.PutTag(name, tags[name]);
            }

            Server.Instance.SaveOfflinePlayerData(this.LoginData.XUID, nbt);
        }