Jump to content

[1.7.10] Few questions using metadata blocks and items


Reignofmagic

Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • 🎰 Mainkan Slot Online dengan Hanya 5 Ribu Via Dana, Proses Cepat! 🎰 Buka pintu ke dunia hiburan tanpa batas di UANG69 Slot Online! Bersiaplah untuk merasakan sensasi kemenangan di ujung jari Anda dengan taruhan serendah 5 ribu rupiah saja, melalui metode pembayaran yang mudah via Dana! ⚡ Proses Cepat, Nikmati Keuntungan dalam Sekejap ⚡ Bergabunglah dengan komunitas slot paling dinamis dan terpanas, dengan puluhan permainan slot yang menakjubkan, serta kesempatan untuk memenangkan jackpot besar! Rasakan gemerlapnya Las Vegas langsung dari kenyamanan rumah Anda sendiri. 🔥 Keunggulan UANG69 Slot Online: 🔥 ✅ Taruhan Serendah 5 Ribu Rupiah ✅ Metode Pembayaran Mudah via Dana ✅ Proses Cepat, Penarikan Lancar ✅ Puluhan Permainan Slot Terbaik ✅ Jackpot Besar Menanti untuk Dimenangkan Bergabunglah dengan UANG69 hari ini dan jadilah bagian dari petualangan slot yang tak terlupakan. Nikmati keseruan, kemenangan, dan hiburan di ujung jari Anda! Jangan lewatkan kesempatan ini, bergabunglah sekarang dan mulailah memenangkan hadiah besar! 💰💎🎉
    • Hello, I am trying to play Minecraft (premium version) with the All Of Create mod from CurseForge. When I launch it from the Minecraft launcher I get an error "The game has stopped working" Error code: 1. I tried to create a modpack, without mods, and launch it (in case there was any incompatibility) but it doesn't work either.... Error with mod: https://paste.ee/p/zzvJY I hope someone can help me. Thanks in advance.
    • Jika Anda mencari maxwin secepat kilat, maka Slot Kilat77 adalah tempatnya! Dengan koleksi slot terbaik yang dirancang untuk memberikan kemenangan instan, setiap putaran di Slot Kilat77 adalah kesempatan untuk memenangkan hadiah besar dalam sekejap. Bergabunglah sekarang dan rasakan sensasi kemenangan kilat di setiap gulungan. Jadi, jangan ragu lagi, mari bergabung dan raih maxwin secepat kilat hanya di Slot Kilat77!
    • Jos77 adalah pilihan terbaik untuk meraih maxwin hari ini! Dengan koleksi permainan slot terbaik dan peluang kemenangan yang tinggi, setiap putaran di Jos77 adalah kesempatan untuk memenangkan hadiah besar. Bergabunglah sekarang dan rasakan sensasi kemenangan yang luar biasa di setiap gulungan. Jadi, jangan lewatkan kesempatan untuk menjadi pemenang hari ini di Jos77 Mulailah petualangan slot Anda sekarang di Jos77 dan temukan sendiri mengapa kami adalah pilihan utama para pencari maxwin. Dengan grafis yang memukau, fitur bonus yang menggiurkan, dan dukungan pelanggan yang luar biasa, kami siap membawa pengalaman bermain Anda ke level berikutnya. Tidak peduli apakah Anda seorang pemula atau ahli slot, Jos77 menyediakan lingkungan yang ramah dan menyenangkan bagi semua pemain. Jadi, bersiaplah untuk meraih maxwin dan nikmati kesuksesan Anda di Jos77 hari ini!  
    • BARBAR77 adalah destinasi utama bagi para pecinta slot online yang mencari sensasi paling barbar! Dengan koleksi slot paling mengagumkan dan peluang kemenangan yang tinggi, BARBAR77 menawarkan pengalaman bermain yang tidak akan Anda temukan di tempat lain. Bergabunglah dengan komunitas kami dan rasakan kegembiraan dari kemenangan yang mengagumkan di setiap putaran. Jadi, siapkan diri Anda untuk petualangan slot yang paling barbar di BARBAR77!
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.