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

there should be world.getId or something to check if it is end

The Korecraft Mod

  • Author

I ment as a sample of the code for it because I know the id numbers and the normal gen code that works in Surface but wen I change Surface to End and id: 0 to id: 1 it does not work unless in tearing the entire End apart I missed my ore which is more common then coal is.

So can some one give me some world gen code that works in the End?

  • Author

Main class code for world gen:

GameRegistry.registerWorldGenerator(new WorldGeneratorEndless());

ย 

World gen class:

package endless.common;

ย 

import java.util.Random;

ย 

import net.minecraft.world.World;

import net.minecraft.world.chunk.IChunkProvider;

import net.minecraft.world.gen.feature.WorldGenMinable;

import cpw.mods.fml.common.IWorldGenerator;

ย 

public class WorldGeneratorEndless implements IWorldGenerator {

ย 

@Override

public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {

ย 

switch(world.provider.dimensionId) {

ย 

case -1:

generateNether(world, random, chunkX * 16, chunkZ * 16);

case 0:

generateSurface(world, random, chunkX * 16, chunkZ * 16);

case 1:

generateEnd(world, random, chunkX * 16, chunkZ * 16);

}

ย 

}

ย 

private void generateNether(World world, Random random, int blockX, int blockZ) {

ย 

}

ย 

private void generateSurface(World world, Random random, int blockX, int blockZ) {

ย 

}

ย 

public int i;

ย 

public int Xcoord;

public int Ycoord;

public int Zcoord;

ย 

private void generateEnd(World world, Random random, int blockX, int blockZ) {

ย 

for (int i = 0; i < 8; i++) {

ย 

int Xcoord = blockX + random.nextInt(16);

int Ycoord = random.nextInt(56);

int Zcoord = blockZ + random.nextInt(16);

ย 

(new WorldGenMinable(Endless.AncientOre.blockID, 8)).generate(world, random, Xcoord, Ycoord, Zcoord);

}

}

}

Not in code:

Smily face is supposed to be eight

ย 

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.