The title is fairly self explanatory. I'm making a private modpack and wanted to make a few mods compatible in the form of loot, which I have been attempting to do. I am running Minecraft 1.7.10, with Thaumcraft 1.7.10-4.2.3.5 and RD 1.5.0 along with other mods, but those are of no importance in this post. I have successfully edited the config files to include custom loot, however, I have found difficulty with attempting to add items with variants, such as the different types of wool. In this case, the item is the gold coin from TC, with the ID of Thaumcraft:ItemResource 18. I have tried writing in a code like this:
Neither of those triggered any sort of syntax error, and other items written in the same way have had no problems with being included into the code, with the following code placing a Thaumium Sword in a chest:
I know that the solution to this is likely painfully obvious, but I cannot figure it out for the life of me, which may be in part due to the fact that I've only started dabbling in coding just a while ago, hence the rudimentary nature of this question. How is the ID of items with variants written? The Gold Coins simply do not appear in the loot chests in the Roguelike Dungeons, however, Thaumium Swords will.
I pulled the name from the coin using the MineTweaker command /mt hand, which gave me Thaumcraft:ItemResource:18, which works in the context of the give command using /give @p Thaumcraft:ItemResource 1 18. If that's not the proper class, where would I be able to get what the item actually is? I can't find any details on item classes in my Thaumcraft config file, and i can't pull anything from the jar either.
The class is located in the jar, under thaumcraft/common/config/ConfigItems.class. Its not the Config that you would configure to change stuff about the mod, found in the config folder in your minecraft's directory.
In the class you'll see the items & where they are registered. I've looked through it and coin (or Gold Coin) does not show up there.
This does show up though, in ConfigItems.class:
itemResource = new ItemResource().func_77655_b("ItemResource");
GameRegistry.registerItem(itemResource, "ItemResource", "Thaumcraft");
I don't rememeber but I think "public void func_94581_a(IIconRegister ir)" was for getting the texture of the items back in 1.7.10, I'll have to look over 1.7.10 to be sure.
Rollback Post to RevisionRollBack
I got a mod...go check it out. Its got guns and hats and other stuff.
The title is fairly self explanatory. I'm making a private modpack and wanted to make a few mods compatible in the form of loot, which I have been attempting to do. I am running Minecraft 1.7.10, with Thaumcraft 1.7.10-4.2.3.5 and RD 1.5.0 along with other mods, but those are of no importance in this post. I have successfully edited the config files to include custom loot, however, I have found difficulty with attempting to add items with variants, such as the different types of wool. In this case, the item is the gold coin from TC, with the ID of Thaumcraft:ItemResource 18. I have tried writing in a code like this:
{"data" : {"name" : "Thaumcraft:ItemResource 18", "min" : 1, "max" : 3}, "weight" : 3}
Along with the name written as follows:
{"data" : {"name" : "Thaumcraft:ItemResource:18", "min" : 1, "max" : 3}, "weight" : 3}
Neither of those triggered any sort of syntax error, and other items written in the same way have had no problems with being included into the code, with the following code placing a Thaumium Sword in a chest:
{"data" : {"name" : "Thaumcraft:ItemSwordThaumium"}, "weight" : 3}
I know that the solution to this is likely painfully obvious, but I cannot figure it out for the life of me, which may be in part due to the fact that I've only started dabbling in coding just a while ago, hence the rudimentary nature of this question. How is the ID of items with variants written? The Gold Coins simply do not appear in the loot chests in the Roguelike Dungeons, however, Thaumium Swords will.
https://github.com/Greymerk/minecraft-roguelike/wiki/Loot-Customisation, look it over.
ItemResource is the wrong class, its to get the texture used for those items not the items themselves.
I can't find "coin" in the mod's class (ConfigItems.class, found in common/config).
I got a mod...go check it out. Its got guns and hats and other stuff.
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1291464-1-8-1-7-10-team-fortress-2-mod-v2-0-0-v1-8-6
I pulled the name from the coin using the MineTweaker command /mt hand, which gave me Thaumcraft:ItemResource:18, which works in the context of the give command using /give @p Thaumcraft:ItemResource 1 18. If that's not the proper class, where would I be able to get what the item actually is? I can't find any details on item classes in my Thaumcraft config file, and i can't pull anything from the jar either.
The class is located in the jar, under thaumcraft/common/config/ConfigItems.class. Its not the Config that you would configure to change stuff about the mod, found in the config folder in your minecraft's directory.
In the class you'll see the items & where they are registered. I've looked through it and coin (or Gold Coin) does not show up there.
This does show up though, in ConfigItems.class:
In ItemResource.class this shows up:
I don't rememeber but I think "public void func_94581_a(IIconRegister ir)" was for getting the texture of the items back in 1.7.10, I'll have to look over 1.7.10 to be sure.
I got a mod...go check it out. Its got guns and hats and other stuff.
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1291464-1-8-1-7-10-team-fortress-2-mod-v2-0-0-v1-8-6
Do you happen to know how I would be able to translate any of this into a working code, if at all possible?
Try:
{"data" : {"name" : "Thaumcraft:ItemResource", "meta" : 18, "min" : 1, "max" : 3}, "weight" : 3}
You need to specify the metadata of the item, which is 18.
I got a mod...go check it out. Its got guns and hats and other stuff.
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1291464-1-8-1-7-10-team-fortress-2-mod-v2-0-0-v1-8-6
Ahhh, got it! Thank you so much. I figured I had to specify the metadata somehow, but I wasn't sure how I should express it. This works perfectly.