Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

HI!

 

Is there any one out here that can help me fix this... or does anyone have some simple code that I could use to generate structure of any type in minecraft?

 

I am editing minecraft 1.6.4 using Eclipse. There are two links below.

 

(Main.java).... GameRegistry.registerWorldGenerator(new MyWorldGen());

 

package mymod.worldgen(World Generator)... http://pastebin.com/KMYcJ7rD

 

Minecraft Crash Report.... http://pastebin.com/i1G9yhxv

 

There are no visible errors that I can see but Minecraft crashes every time.

 

Can someone please tell me how to go about correcting this? I placement code is what is causing the crash. ??

 

Thank you

 

HI!

 

Is there any one out here that can help me fix this... or does anyone have some simple code that I could use to generate structure of any type in minecraft?

 

I am editing minecraft 1.6.4 using Eclipse. There are two links below.

 

(Main.java).... GameRegistry.registerWorldGenerator(new MyWorldGen());

 

package mymod.worldgen(World Generator)... http://pastebin.com/KMYcJ7rD

 

Minecraft Crash Report.... http://pastebin.com/i1G9yhxv

 

There are no visible errors that I can see but Minecraft crashes every time.

 

Can someone please tell me how to go about correcting this? I placement code is what is causing the crash. ??

 

Thank you

 

firstly I suggest you clean up your code, I mean seriously?

                world.setBlock(i + 22, j + 0, k + 12, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 13, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 14, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 15, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 16, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 17, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 18, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 19, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 20, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 21, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 22, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 23, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 24, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 25, Block.cobblestone.blockID);
                world.setBlock(i + 22, j + 0, k + 26, Block.cobblestone.blockID);

You can use loops for this stuff, makes the code a lot more readable and debugging won't be a PITA.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

That's one hell of a stacktrace. It looks like your call to world.canBlockSeeTheSky is causing problems and somehow calls your generate function again, which calls world.canBlockSeeTheSky ... And so on. I suggest simply getting rid of it.

 

Also, do you really mean to say "if block exists OR block is exposed to the sky"? Or do you mean AND?

I like to make mods, just like you. Here's one worth checking out

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.