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.

Justin_Perry

Members
  • Joined

  • Last visited

Everything posted by Justin_Perry

  1. Thank you so much, I will look into that!
  2. package Justin_Perry.learningMod.gen; import java.util.Random; import Justin_Perry.learningMod.init.modBlocks; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.IChunkGenerator; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraftforge.fml.common.IWorldGenerator; public class nestGen implements IWorldGenerator{ @Override public void generate(Random random, int ChunkX, int ChunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { if (world.provider.getDimension() == 0 ) { generateSurface(random, ChunkX, ChunkZ, world, chunkGenerator, chunkProvider); } } private void generateSurface(Random random, int ChunkX, int ChunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { generateOre(modBlocks.BEE_NEST_BLOCK.getDefaultState(), world, random, ChunkX*16, ChunkZ*16, 63, 80, 40, 50); } private void generateOre(IBlockState ore, World world, Random random, int x, int z, int minY, int maxY, int size, int chances) { int deltaY = maxY - minY; for(int i = 0; i < chances; i++) { BlockPos pos = new BlockPos (x + random.nextInt(16), minY + random.nextInt(deltaY), z + random.nextInt(16)); WorldGenMinable generator = new WorldGenMinable(ore, size); generator.generate(world, random, pos); } } } I am attempting to generate a block, BEE_NEST_BLOCK on the surface of the overworld only. I have drastically increased the size and possibility of the block's generation just to make sure it is being generated. I discovered it is, in fact, being generated, However, my hypothesis, based on visual inspection, is that these blocks are only "replacing" stone blocks. If I could be lead in the right direction, I would appreciate it. I have spent a few hours on this situation as well as looking for a hint from previous posts, but I could not find any. Thank you very much for your time, patience, and effort to help me.

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.