Posted January 7, 20223 yr im trying to generate trees on beaches but almost everytime it generates in the water here is the code: public class FJPlacements { public static final PlacedFeature PALM_TREE_PLACED = PlacementUtils.register("palm_tree_placement", FJConfiguredFeatures.PALM.placed(RarityFilter.onAverageOnceEvery(1), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP_WORLD_SURFACE, PlacementUtils.HEIGHTMAP_TOP_SOLID, BiomeFilter.biome())); } @Mod.EventBusSubscriber(modid = FosilizedJourneys.MOD_ID) public class WorldGenerationEvents { @SubscribeEvent public static void biomeLoadingEvent(final BiomeLoadingEvent event) { ResourceKey<Biome> key = ResourceKey.create(Registry.BIOME_REGISTRY, event.getName()); Set<BiomeDictionary.Type> types = BiomeDictionary.getTypes(key); if (types.contains(BiomeDictionary.Type.BEACH)) { if (types.contains(BiomeDictionary.Type.SANDY)) { event.getGeneration().addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, FJPlacements.PALM_TREE_PLACED); } } } }
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.