Exemple #1
0
 public override void Load(TagCompound tag)
 {
     Setup(tag);
     if (ModContent.TryFind(modName, itemName, out ModItem modItem))
     {
         item.SetDefaults(modItem.Type);
         item.modItem.Load(tag.GetCompound("data"));
         ItemIO.LoadGlobals(item, tag.GetList <TagCompound>("globalData"));
     }
 }
Exemple #2
0
        public override void Load(TagCompound tag)
        {
            Setup(tag);
            int type = ModLoader.GetMod(modName)?.ItemType(itemName) ?? 0;

            if (type > 0)
            {
                item.netDefaults(type);
                item.modItem.Load(tag.GetCompound("data"));
                ItemIO.LoadGlobals(item, tag.GetList <TagCompound>("globalData"));
            }
        }
Exemple #3
0
 public override void Load(Item item, TagCompound tag)
 {
     ItemIO.LoadGlobals(item, tag.GetList <TagCompound>("list"));
 }