Posted July 3, 20196 yr EDIT: I think I need to add the feature to a biome generation. I should have seen someone posted something similar just before. EDIT 2: Welp I think I figured it out haha... almost... I believe its because diamond blocks can be placed on air whereas flowers cannot so its spawning them in the air. I'm trying to register a flower feature generation and I think I figured out how I need to register it but nothing is generating so I'm not sure if I'm doing it quite right. This is the code I'm using to register the feature and this is getting called in the constructor of my main class. ModFlowersFeature flowersFeature = new ModFlowersFeature(NoFeatureConfig::deserialize); flowersFeature.setRegistryName("mod_flowers"); ForgeRegistries.FEATURES.register(flowersFeature); And this is the flower feature and I'm using diamond blocks so that i can easily see if it works. public class ModFlowersFeature extends FlowersFeature { public ModFlowersFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> featureConfig) { super(featureConfig); } public BlockState getRandomFlower(Random random, BlockPos pos) { return Blocks.DIAMOND_BLOCK.getDefaultState(); } } If anyone knows what I'm doing wrong I would really appreciate the help. Edited July 3, 20196 yr by Ellbelly
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.