public override void LoadCustomData(BinaryReader reader) { string modName = reader.ReadString(); bool hasGlobal = false; if (modName.Length == 0) { hasGlobal = true; modName = reader.ReadString(); } Setup(modName, reader.ReadString(), ItemIO.GetCustomData(Int32.MaxValue, reader, hasGlobal), hasGlobal); var type = ModLoader.GetMod(modName)?.ItemType(itemName) ?? 0; if (type != 0) { item.netDefaults(type); ItemIO.ReadCustomData(item, data, hasGlobalData); } }