Go to the code tab -> TestEnvironmentMod.java -> search for "public void load(FMLInitializationEvent event) {" type in "OreDictionary.registerOre("the oredict name, example oreCopper", classofyourore);"
If you don'tmind me asking, what exactly did you type in and where - what does it look like? Im just making sure im typing it down correctly; novice coder here.
C:\Pylo\MCreator176_3\forge\build\sources\main\java\mod\mcreator\mcreator_leadOre.java:50: error: cannot find symbol
OreDictionary.registerOre("oreLead", classofyourore);
^
symbol: variable classofyourore
location: class mcreator_leadOre
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Yes, I don't know what to write in "classofyourore"
I'm no coder but I think "classofyourore" is the thing that goes like this:
public class mcreator_TheNameOfYourOreWithoutCaps { after all the import stuff.
Lets say your ore is named Raol Lead, then your line should be OreDictionary.registerOre("oreLead", mcreator_raolLead); or something along those lines. I'm no coder so I might have made mistakes. I don't know if you need the ''mcreator'' or not. Try with and without and see what works.
In the list of mod elements, the name of the item that you want to reference exactly the way it is written would be classofyourore, so if I had a mod element called Super_Dirt, in the list of mod elements it would just display SuperDirt and that is what you would put in. For the part that says "oredict name" you can actually put anything you find appropriate.
Nope, i have been wondering the same question for weeks now, :T
Go to the code tab -> TestEnvironmentMod.java -> search for "public void load(FMLInitializationEvent event) {" type in "OreDictionary.registerOre("the oredict name, example oreCopper", classofyourore);"
If you still dont know, just look at the source code of forge
@#2 ok thanks
@#3
ok, thanks MrCreator! :)
If you don'tmind me asking, what exactly did you type in and where - what does it look like? Im just making sure im typing it down correctly; novice coder here.
I have tried to put OreDictionary.registerOre(oreLead) under that public load line but it makes recompilation fail
Yes answer after a year XD
You also need to add this line to the top of the code, with the other "imports":
import net.minecraftforge.oredict.OreDictionary
If that doesn't work post the recompilation error and I'll have a look-ie-do.
Thanks, I'll try
The recompilation error:
C:\Pylo\MCreator176_3\forge\build\sources\main\java\mod\mcreator\mcreator_leadOre.java:50: error: cannot find symbol
OreDictionary.registerOre("oreLead", classofyourore);
^
symbol: variable classofyourore
location: class mcreator_leadOre
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Yes, I don't know what to write in "classofyourore"
I'm no coder but I think "classofyourore" is the thing that goes like this:
public class mcreator_TheNameOfYourOreWithoutCaps { after all the import stuff.
Lets say your ore is named Raol Lead, then your line should be OreDictionary.registerOre("oreLead", mcreator_raolLead); or something along those lines. I'm no coder so I might have made mistakes. I don't know if you need the ''mcreator'' or not. Try with and without and see what works.
I'm on the same boat It's trial and error for me till it works lol.
In the list of mod elements, the name of the item that you want to reference exactly the way it is written would be classofyourore, so if I had a mod element called Super_Dirt, in the list of mod elements it would just display SuperDirt and that is what you would put in. For the part that says "oredict name" you can actually put anything you find appropriate.
I've tried the OreDictionary registering as seen above, and it didn't cause a recompilation error, but it doesn't work ingame.
Might as well keep trying.