-
[1.7.10] Few questions using metadata blocks and items
Updated original post to give links to correct area as I consolidated my ores to be in 1 item id. I also removed 2nd question due to it being answered via some help from reddit.
-
[1.7.10] Few questions using metadata blocks and items
Pretty much my mod is making tools and armor for some gems that are already available in other mods. I am also generating these gems as ores within my own mod as well. Alright so I have 3 main questions regarding the use of metadata. Before stating them I shall let you all know I already have made both block and items with metadata, and they work just fine in game. IE the metadata shows up. The first question is this: I wish to register my ores/gems in the ore dictionary, but am having no luck doing so.. I am able to use things for testing purposes that are already in the ore dictionary (vanilla items). As an example in my recipes section I currently have my Malachite Pickaxe being made with "blockGold" and "stickWood". So I understand that portion, I am mainly having the problem registering my metadata items into the ore Dictionary. Here are the links to the relevant areas on my github Main File: https://github.com/Reignofmagic/GTFO/blob/NewMaster/src/main/java/com/reignofmagic/gems/Gems.java Dictionary: https://github.com/Reignofmagic/GTFO/blob/NewMaster/src/main/java/com/reignofmagic/gems/handler/Dictionary.java Recipes: https://github.com/Reignofmagic/GTFO/blob/NewMaster/src/main/java/com/reignofmagic/gems/handler/ModRecipes.java The Second question is a followup of the first. How do I make recipes with metadata items. I am able to make the topaz tier of items work just fine as shown in the Recipes link above, but that is probably because topaz is metadata 0. If I switch topaz Boots to be crafted with malachite (as I have done for testing purposes already) to 1, the recipe won't work with malachite, but will still work just fine with topaz. I believe this is because I don't have the string set up correctly to take into account metadata. Note that this probably will not be a big issue once I have all my gems put in the ore dictionary as I will just be using the dictionary name. I am mainly just wanting to see what I did wrong with this section for the sake of learning. For clarity's sake here is the line of code I am referring to for using malachite instead of topaz: GameRegistry.addRecipe(new ItemStack(ModItems.topazBoots), "X X", "X X", 'X',new ItemStack(ModItems.Gemstones, 1) ); The Third question is How do I get my gems that are all in a single item using metadata for the different types, to drop from my ores correctly which are also using metadata, although spread across two different files due to different harvest levels. For example, I wish malachite to drop from malachite Ore, ruby from ruby ore etc, where currently topaz is the only gem which will drop from any of the ores. I have played around with what I think should work and it either comes out as an error in eclipse, or ignores the metadata. As such I cut it down so to just refer to the gemstones file as the other code was not working. Links to relevant spots on github: Gemstones: https://github.com/Reignofmagic/GTFO/blob/NewMaster/src/main/java/com/reignofmagic/gems/items/ItemGemstones.java Ores https://github.com/Reignofmagic/GTFO/blob/NewMaster/src/main/java/com/reignofmagic/gems/blocks/gemOres.java https://github.com/Reignofmagic/GTFO/blob/NewMaster/src/main/java/com/reignofmagic/gems/blocks/ItemgemOres.java Thanks in advance for any help you can give! If you need clarity from me I am more than happy to provide it. Reign
IPS spam blocked by CleanTalk.