Trouble when trying to get the type of a modded item

Nakano15

Terrarian
This trouble actually is old, I know It for quite some time, ever since I was trying to add a modded giant hammer to a companion of mine as starter item, but It never appeared in their inventory.

The background here is different, I'm implementing a system where some of the companions have their own shop setup, and they are loaded either when their base infos are loaded, or when the world file loads.

I'm using ItemDefinition from Terraria.ModLoader.Config to define which item is it, and get It's type, because It seems like a good way of making the mod loader find what item I'm talking about. Well, I was wrong.
The problem is that the ItemDefinitions of modded items are possibly giving item type 0, the same problem I were having with ModContent.ItemType<type>() (which is also the reason why I'm using ItemDefinition right now). I really don't have any idea of how to make the game know I want to call a mod item, and make It get the item type.

Anyone has a clue?
 
Back
Top Bottom