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

I want my ore to be generated in the end. I did this:

@Mod.EventBusSubscriber(modid = MODID)
public class OreGeneration2 {

    private static ConfiguredFeature oreConfiguredFeature;

    private static ConfiguredFeature oreConfiguredFeature() {
        if (oreConfiguredFeature == null) {
            oreConfiguredFeature = new ReplaceBlockFeature(ReplaceBlockConfig.CODEC) {
                @Override
                public boolean generate(ISeedReader reader, ChunkGenerator generator, Random rand, BlockPos pos, ReplaceBlockConfig config) {
                    return super.generate(reader, generator, rand, pos, config);
                }
            }.withConfiguration(new ReplaceBlockConfig(Blocks.END_STONE.getDefaultState(), RegistryHandler.CATAZ_END_ORE.get().getDefaultState()))
                    .withPlacement(new Height4To32(NoPlacementConfig.CODEC) {
                        @Override
                        public Stream<BlockPos> getPositions(Random random, NoPlacementConfig config, BlockPos pos) {
                            return IntStream.range(200, 201 + random.nextInt(3)).mapToObj((count) -> {
                                int j = random.nextInt(16) + pos.getX();
                                int k = random.nextInt(16) + pos.getZ();
                                int startY = 1;
                                int endY = 255;
                                int l = startY+random.nextInt(endY-startY+1);
                                return new BlockPos(j, l, k);
                            });
                        }
                    }.configure(IPlacementConfig.NO_PLACEMENT_CONFIG));
        }

        return oreConfiguredFeature;
    }

    @SubscribeEvent
    public static void registerOreAtBiomes(BiomeLoadingEvent event) {
        if (event.getCategory().equals(Biome.Category.THEEND)) {
            event.getGeneration().withFeature(GenerationStage.Decoration.UNDERGROUND_ORES, oreConfiguredFeature());
        }
    }

}

It is not generated. Tell me where I screwed up.

Edited by Dmitrium12
didn't specify the version

  • Dmitrium12 changed the title to Ore Generation In the END 1.16
  • 10 months later...
On 6/2/2021 at 1:59 PM, Dmitrium12 said:
    @SubscribeEvent
    public static void registerOreAtBiomes(BiomeLoadingEvent event) {
        if (event.getCategory().equals(Biome.Category.THEEND)) {
            event.getGeneration().withFeature(GenerationStage.Decoration.UNDERGROUND_ORES, oreConfiguredFeature());
        }
    }

this should work, if not create your own thread (show your code) since this thread is ancient

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.