Hi I'm currently having trouble with understanding how to link a asset location. When I try to create an item stack of a modded item it returns Item Stack not found. A vanilla item works when called.
modid is test
public override WorldInteraction[] GetPlacedBlockInteractionHelp(IWorldAccessor world, BlockSelection selection, IPlayer forPlayer)
{
return new WorldInteraction[]
{
new WorldInteraction()
{
ActionLangCode = "Add Paperx8",
MouseButton = EnumMouseButton.Right,
HotKeyCodes = new string[] {"sprint", "sneak" },
Itemstacks = new ItemStack[] { new ItemStack(world.GetItem(new AssetLocation("paper")), 8) }//item not found
}
}.Append(base.GetPlacedBlockInteractionHelp(world, selection, forPlayer));
}
the item.json file is located assets/paper/itemtypes/paper.json
{
"code": "paper",
"class": "PaperItem",
"creativeinventory": {
"general": [ "*" ]
},
"texture": {
"base": "item/paper"
}
}
help would be apricated on how to create an asset location for any modded object.