Jump to content

Timebreaker900

Members
  • Posts

    13
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Timebreaker900's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hey! Can anyone explain what the tries, xSpread and ySpread actually do? public static final BlockClusterFeatureConfig FLOWER = (new BlockClusterFeatureConfig.Builder( new SimpleBlockStateProvider(BlockInit.FLOWER.get().getDefaultState()), new SimpleBlockPlacer())).whitelist(ImmutableSet.of(Blocks.GRASS_BLOCK)) .tries(1) .xSpread(25) .ySpread(25) .build(); I always thought that the tries is how often it spawn. But if I use the Spread and set the tries to around 100 it doesnt feel, that it spawns more often. My problem is now that I want to make the flowers a bit rarer and I also want to make a config file so that someone can change the rarity via the tries. Thanks in advance!
  2. Hi, I'm trying to generate a bush object in 1.16.3 and I need some help with it. This is my attempt: public static void initBushes() { Registry.register(WorldGenRegistries.field_243653_e, BlockInit.XP_BUSH.get().getRegistryName(), Feature.FLOWER .withConfiguration(init.XP_BUSH) .withPlacement(Placement.field_242907_l .configure(new TopSolidRangeConfig(5, 5, 128)) ) ); } public static void setupBushes() { for (Map.Entry<RegistryKey<Biome>, Biome> biome : WorldGenRegistries.field_243657_i.func_239659_c_()) { if (!biome.getValue().getCategory().equals(Biome.Category.NETHER) && !biome.getValue().getCategory().equals(Biome.Category.THEEND)) { addFeatureToBiome(biome.getValue(), GenerationStage.Decoration.VEGETAL_DECORATION, WorldGenRegistries.field_243653_e.getOrDefault(BlockInit.XP_BUSH.get().getRegistryName())); } } } private static void addFeatureToBiome(Biome biome, GenerationStage.Decoration vegetalDecoration, ConfiguredFeature<?, ?> configuredFeature) { List<List<Supplier<ConfiguredFeature<?, ?>>>> biomeFeatures = new ArrayList<>(biome.func_242440_e().func_242498_c()); while (biomeFeatures.size() <= vegetalDecoration.ordinal()) { biomeFeatures.add(Lists.newArrayList()); } List<Supplier<ConfiguredFeature<?, ?>>> features = new ArrayList<>(biomeFeatures.get(vegetalDecoration.ordinal())); features.add(() -> configuredFeature); biomeFeatures.set(vegetalDecoration.ordinal(), features); ObfuscationReflectionHelper.setPrivateValue(BiomeGenerationSettings.class, biome.func_242440_e(), biomeFeatures,"field_242484_f"); } I can't get it to work. If you need more code here is my github: https://github.com/Timebreaker900/MetalBushesMod/tree/1.16.3 Thanks in advance!!!
  3. Ok it looks like the don't want to spawn in the Nether_Waste Biome what I origanlly had. If I spawn them in every biome the only spawn in the fungus biomes.. but thanks I finally got it 🤗
  4. This is what I have @Override protected boolean isValidGround(BlockState state, IBlockReader worldIn, BlockPos pos) { return state.isIn(Blocks.NETHERRACK); } I used tries(50) And this if (biome == Biomes.NETHER_WASTES) { biome.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH//Feature.field_236282_M_ .withConfiguration(BiomeFeatures.NETHER_QUARTZ_BUSH) .withPlacement(Placement.COUNT_HEIGHTMAP.configure(new FrequencyConfig(30))) ); } But it won't generate..
  5. Ok, I changed Block.Properties to AbstractBlock.Properties, thanks for that. Yes I used the BlockStateProviderFeatureConfig but it changed nothing. I also tried to override the isValidGround but I discovered that it is a protected boolean so i don't think thats going to work or am I wrong? And btw thanks for your effort man appreciate that. I work on this for days.. and I can't figure it out.. I think I will give up..
  6. Also on tries(50) it don't want to spawn. https://github.com/Timebreaker900/MetalBushesMod Here take look if you want
  7. Yes I set the tries(1) also to higher numbers and it doesnt show up. Thanks for the tip with the defaultBiomeFeature I look into it. RANDOM_PATCH also was not working.
  8. I tried to spawn a bush inside the nether I had many different tries but i can't get it to work. I tried it with the BlockClusterFeatureConfig public static final BlockClusterFeatureConfig NETHER_QUARTZ_BUSH = (new BlockClusterFeatureConfig.Builder( new SimpleBlockStateProvider(BlockInit.NETHER_QUARTZ_BUSH.get().getDefaultState()), new SimpleBlockPlacer())).whitelist(ImmutableSet.of(Blocks.NETHERRACK)).tries(1).build(); and here is the code where it should generate the bush public static void generateBushesNether() { for (Biome biome : ForgeRegistries.BIOMES) { if (biome.getCategory() == Biome.Category.NETHER) { biome.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.FLOWER .withConfiguration(BiomeFeatures.NETHER_QUARTZ_BUSH) .withPlacement(Placement.COUNT_EXTRA_HEIGHTMAP.configure(new AtSurfaceWithExtraConfig((int)0.4F, 0.1F, 1))) ); } } } I also don't know if there is a better way to generate things like flowers or bushes. Any Ideas? Thanks in advance!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.