Jump to content

hbh7

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by hbh7

  1. This is what i have. //--------------// //Block Registry// //--------------// public static EventManager eventManager = new EventManager(); @EventHandler public void preInit(FMLInitializationEvent event) { GameRegistry.registerBlock(TopazOre, "TopazOre"); GameRegistry.registerBlock(YellowTopazOre, "YellowTopazOre"); GameRegistry.registerBlock(EnigmaOre, "EnigmaOre"); GameRegistry.registerBlock(EnigmaBlock, "EnigmaBlock"); GameRegistry.registerBlock(TopazBlock, "TopazBlock"); GameRegistry.registerBlock(YellowTopazBlock, "YellowTopazBlock"); GameRegistry.registerBlock(JasperBlock, "JasperBlock"); GameRegistry.registerBlock(JadeBlock, "JadeBlock"); GameRegistry.registerBlock(RainbowBlock, "RainbowBlock"); GameRegistry.registerBlock(OnyxBlock, "OnyxBlock"); GameRegistry.registerBlock(PlatinumBlock, "PlatinumBlock"); GameRegistry.registerBlock(JasperOre, "JasperOre"); GameRegistry.registerBlock(JadeOre, "JadeOre"); GameRegistry.registerBlock(OnyxOre, "OnyxOre"); GameRegistry.registerBlock(PlatinumOre, "PlatinumOre"); GameRegistry.registerBlock(AuroraCrystalOre, "AuroraCrystalOre"); } //-------------------------------// //Registering The World Generator// //-------------------------------// @EventHandler public void load(FMLInitializationEvent event) { GameRegistry.registerWorldGenerator(Genworld); }
  2. Still doesn't work, even with that change. With that, errors on startup are: java.lang.Error: Unresolved compilation problems: EventManager cannot be resolved to a type Illegal modifier for parameter eventManager; only final is permitted EventManager cannot be resolved to a type void is an invalid type for the variable preInit Syntax error on token "(", ; expected Syntax error on token ")", ; expected void is an invalid type for the variable load Syntax error on token "(", ; expected Duplicate local variable event Syntax error on token ")", ; expected ....No idea what i am doing wrong, i typed it like you guys showed, but it still gives these errors... Any idea what i'm doing wrong?
  3. Hello and thanks for checking out my topic. I have another question about modding. So I have been looking on the internet for a way to change one of minecraft's blocks to drop a different item occasionally. I only found ways to do that on a block that you create. I want to make it work like gravel does, usually dropping gravel, and sometimes dropping flint. I just need a way to modify(or way around it) the minecraft block class to do this. (NOT gravel, a different block that is from vanilla minecraft, possibly multiple blocks in the future) Does anyone know a way to do this? Thanks in advance!
  4. You'd be surprised how much i looked.... But for some reason, they still had the error when I tried them... When i try this, i get errors on preInit(void is an invalid type for the variable preInit), and load(void is an invalid type for the variable load). At the end of the public void load(FMLInitializationEvent event) and public void preInit(FMLPreInitializationEvent event), it gives this error, (Syntax error on token ")", ; expected). This is similar to what i get on the other tutorials... The game also crashes with these errors:(similar errors with other tutorials) java.lang.Error: Unresolved compilation problems: void is an invalid type for the variable preInit syntax error on token "(", ; expected Syntax error on token ")", ; expected void is an invalid type for the variable load syntax error on token "(", ; expected Duplicate local variable event Syntax error on token ")", ; expected I honestly have no idea whats wrong with this... but that's what i get when i follow the tutorials. I originally thought it was because they were old, so i'm asking here. If anyone has any idea why i'm getting these problems, I would be very grateful for help.
  5. Ok, so problem 1 is solved. Now i just need to figure out how to construct blocks in preInit... Can anyone help me with that? I cant seem to figure it out...
  6. I'm fairly new at this, so I'm not 100% sure on what I'm doing... So that's why it seems like it... I'm pretty sure I know what you mean for #1. For #2, now that you pointed that out, i see you are right. I read that over many times and each time i thought you said you didn't have to, i see now that's not what you said, sorry about that. For #3, i thought you meant don't do that, as in remove it. My mistake, sorry about that. I have a fair idea on what it means, I'm just not too sure how to construct it in preint... I will look into it.
  7. Ok thanks, i will try it out. For #1, how would you go about doing that? I am not sure what to change to do that. Edit: Removing the gameregistry.registerworldgenerator causes no ores to generate at all. And the game crashes if i remove the Topazore = new BlockTopazOre... etc. I'm not sure if i know what you mean by all this...
  8. Note: This is solved now, solutions "in a nutshell" follow the problem. Hello, i'm having some problems with my mod, as you probably know from the title. Problem 1: When i create ores that i want to spawn in the overworld, only the first one that i made will generate. Currently i have 3 ores, but only 1 will generate in the world. I plan to make more, if, i can get more than 1 to spawn. The code for the 3 ores is pretty much the same, i'm not sure if the similarity is the problem, or something else, but i hope someone else knows how to fix this, because i'm clueless... I spend hours on the internet looking for a solution but haven't found one. Code: TopazOreWorldGeneration (This is the only one that generates an ore out of the 3 ores i have) http://paste.minecraftforge.net/view/embed/07c5a1e1 YellowTopazOreWorldGeneration (All other ores look like this, so i only included this one.) http://paste.minecraftforge.net/view/embed/5be712db I'm not sure if this is helpful or not, but its in my main class that deals with the ore generation. public static TopazOreWorldGeneration Genworld = new TopazOreWorldGeneration(); public static YellowTopazOreWorldGeneration Genworld1 = new YellowTopazOreWorldGeneration(); Solution: Instead of having one class that generates all the ores, i had a separate class for each ore i wanted to generate. Problem 2: Whenever i run my mod in eclipse and out of eclipse, i get a message in the console that says, "[WARNING] [ForgeModLoader] The mod FMLMod:hbhbtm{1.0} is attempting to register a block whilst it it being constructed. This is bad modding practice - please use a proper mod lifecycle event. " I'm wondering what i can do to fix this. Here is the code for the blocks that i think is causing the message. GameRegistry.registerBlock(TopazOre, "TopazOre"); GameRegistry.registerBlock(YellowTopazOre, "YellowTopazOre"); I'm not sure what to change it to to fix this. If you can help me, thanks in advance! Solution: I needed to use PreInit, and Init to register the blocks at the proper time. More details are in replies below
  9. thank you, sorry about your grandfather.
  10. Manually downloading the jars doesn't work either, if anyone was going to test that. Hope they fix this soon.
×
×
  • Create New...

Important Information

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