Posted June 2, 20214 yr 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 June 2, 20214 yr by Dmitrium12 didn't specify the version
April 8, 20223 yr 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.