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.

Evanw1256

Members
  • Joined

  • Last visited

  1. Hey! I am currently working on a mod that adds some ores to the End. The ores I have generating in the overworld work fine, however the ores that I have generating in the end just don't generate! Here is one of my end ore generator classes: package com.evanw1256.bote.generation; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import com.evanw1256.bote.init.ModBlocks; import cpw.mods.fml.common.IWorldGenerator; public class EndriteGenerator implements IWorldGenerator { public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId) { case 0: generateSurface(random, chunkX*16, chunkZ*16, world); break; case 1: generateEnd(random, chunkX*16, chunkZ*16, world); break; case -1: generateNether(random, chunkX*16, chunkZ*16, world); break; default:; } } public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int minVainSize, int maxVainSize, int chancesToSpawn, int minY, int maxY ) { for(int i = 0; i < chancesToSpawn; i++) { int posX = blockXPos + random.nextInt(16); int posY = minY + random.nextInt(maxY - minY); int posZ = blockZPos + random.nextInt(16); new WorldGenMinable(block, (minVainSize + random.nextInt(maxVainSize - minVainSize)), Blocks.stone).generate(world, random, posX, posY, posZ); } } private void generateNether(Random random, int i, int j, World world) { // TODO Auto-generated method stub } private void generateEnd(Random random, int i, int j, World world) { // TODO Auto-generated method stub addOreSpawn(ModBlocks.endriteOre, world, random, i, j, 2, 5, 70, 0, 100); } private void generateSurface(Random random, int chunkX, int chunkZ, World world) { } } And then here is my generation init file: package com.evanw1256.bote.init; import com.evanw1256.bote.generation.EndriteGenerator; import com.evanw1256.bote.generation.EnosGenerator; import com.evanw1256.bote.generation.HemiteGenerator; import com.evanw1256.bote.generation.TerriumGenerator; import cpw.mods.fml.common.registry.GameRegistry; public class ModGeneration { public static void Init() { GameRegistry.registerWorldGenerator(new HemiteGenerator(), 1); GameRegistry.registerWorldGenerator(new TerriumGenerator(), 1); GameRegistry.registerWorldGenerator(new EndriteGenerator(), 1); GameRegistry.registerWorldGenerator(new EnosGenerator(), 1); } }

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.