Jump to content

[Solved] Add an Vannila Item to the Ore Dictionary


nekpek

Recommended Posts

So lately i've been working on a mod

and everything was going fine till i had to compile it

I thought adding the Vannila item manualy to the

net.minecraftforge.oredict.OreDictionary.java

would work (which it did if i ran mc from eclipse)

but when i compile it and install the mod the ore dictionary does not work.

 

So how would i add a Vanilla item (leather to be specific) to the ore Dictionary?

Naturalis - The easy way for nature.!

Esquire - A helping hand for your adventure.

Jimanju - The Random Disasters!

Link to comment
Share on other sites

Vanilla items should be in the dictionary by default.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Under what names

Not even when i open up the Ore Dictionary file can i find anything about leather.

 

the only thing i can find that is vanilla is

logWood

plankWood

slabWood

StairWood

StickWood

treeSapling

treeLeaves

oreGold

oreIron

oreDiamond

oreRedstone

oreEmerald

 

No leather which is what i need.

 

 

Naturalis - The easy way for nature.!

Esquire - A helping hand for your adventure.

Jimanju - The Random Disasters!

Link to comment
Share on other sites

What I meant was:

I thought all vanilla items went into the ore dictionary. :x

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

me too when i began this project

So how would i add them if it was possible

 

I know how to make it work if i may edit the forge files but then it wont load in the mods folder (the Ore Dictionary)

how come?

 

it's 2 line of code that i need to add in the forge Ore Dictionary.

 

would there be another way to make my "leather" work as "leather" in the vanilla recipes and mod recipe's that require leather?

or

how would i make "my" forge Ore Dictionary file load?

Naturalis - The easy way for nature.!

Esquire - A helping hand for your adventure.

Jimanju - The Random Disasters!

Link to comment
Share on other sites

Don't know, the only thing I used the dictionary for was to listen for IDs of ore blocks so I could have my custom ore maps register the block as valuable.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Cause my mod is about adding a new item that you can use as leather

 

it is Cork leather

that is made out of cork from trees.

Naturalis - The easy way for nature.!

Esquire - A helping hand for your adventure.

Jimanju - The Random Disasters!

Link to comment
Share on other sites

 

Well then, I guess you could try:

OreDictionary.registerOre("leather", new ItemStack(Item.leather));

Then add your cork leather under the same name and attempt to make leather armor or something?

I tried that very first, and it would work if it wasn't because you had to overwrite the vanilla recipes with the Ore Dictionary word for leather

 

i have a solution here

[sOLVED]

 

I simple added the code itself inside the Ore Dictionary

 

 registerOre("itemLeather", Item.leather);

under the other registerOre lines

and then under

 

replacements.put(new ItemStack(Item.stick), "stickWood");

i added

replacements.put(new ItemStack(Item.leather), "itemLeather");

 

when compiling you will get two file in net\minecraftforge\oredict

thouse should be added inside the minecraft.jar

then you simple load you mod as normal and everything runs smoothly

and when forge comes with an update for the leather you simple skip that step

Naturalis - The easy way for nature.!

Esquire - A helping hand for your adventure.

Jimanju - The Random Disasters!

Link to comment
Share on other sites

while the idea have struck it make no sense that cork leather would turn into normal leather. even tho Steve is extremely good in crafting stuff i don't think he is that good.

 

besides it is only temporary till Forge adds the leather (and the rest of the vanilla items) into the ore dictionary.

 

the edit i made to the Ore Dictionary doesn't effect any other mod, unless they too have edited the Ore Dictionary file. which i doubt as everyone refrain from editing base files.

 

also how much fuss does it do?. i've tested it with alot of other mods (bc, IC) and none broke.

Naturalis - The easy way for nature.!

Esquire - A helping hand for your adventure.

Jimanju - The Random Disasters!

Link to comment
Share on other sites

while the idea have struck it make no sense that cork leather would turn into normal leather. even tho Steve is extremely good in crafting stuff i don't think he is that good.

 

besides it is only temporary till Forge adds the leather (and the rest of the vanilla items) into the ore dictionary.

 

the edit i made to the Ore Dictionary doesn't effect any other mod, unless they too have edited the Ore Dictionary file. which i doubt as everyone refrain from editing base files.

 

also how much fuss does it do?. i've tested it with alot of other mods (bc, IC) and none broke.

Eh, it's good practice not to make base edits if you can avoid it.

 

Not that I would know anything about good practice...  :D

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

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.

×
×
  • Create New...

Important Information

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