Jump to content

[SOLVED] [1.7.10] Ore generation not generating


Recommended Posts

Posted

Hi, I'm having some problems with the ore generation: the block isn't generated. I did everything I know needed for it to work, but it isn't generated at all, even if I fly far away, or teleport, or set high numbers, like vein size and chance to spawn, none of my blocks are generated. I don't know what I missed or did wrong. There are no errors. I compared my code with the ones people with working ore generation posted, but it's basically exactly the same, and still no ore generation, either in Eclipse or if I compile it and run it from mods folder in normal Minecraft. I also putted printlns all over the code to check if it's being run, but yes, it is, but no blocks are generated, even if I change to vanilla blocks.

 

Does the block have to be of a specific type to be generated? Or something needs to be added in the block class, or something?

 

 

Here's the the main class: http://pastebin.com/eKAdzfja

 

and the world generation class: http://pastebin.com/TkRMMe5f

Posted

For starters, I am leery of "new WorldGenMinable" appearing inside a loop in which its arguments do not change value. I'd hoist this up to a higher level, assigning its result to an object var that you use in its place inside the loop.

 

However, I don't think that's the problem. Set a breakpoint at or inside addOreSpawn and then step through it. Step into the generate call. Examine variables as you go. Something should jump out at you. Maybe something wasn't initialized somewhere else. The debugger can reveal that real quick.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

For starters, I am leery of "new WorldGenMinable" appearing inside a loop in which its arguments do not change value. I'd hoist this up to a higher level, assigning its result to an object var that you use in its place inside the loop.

 

However, I don't think that's the problem. Set a breakpoint at or inside addOreSpawn and then step through it. Step into the generate call. Examine variables as you go. Something should jump out at you. Maybe something wasn't initialized somewhere else. The debugger can reveal that real quick.

 

Well, I already fixed it, and it's generating normally now, as can be seen here. But thanks anyway. =)

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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