Advertisement
jayhillx

mushroomfeatures

Feb 9th, 2021
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. //BlockStates
  2. public static final class States {
  3. //Flower Stuff
  4. private static final BlockState MAGENTA_MUSHROOM = ModBlocks.MAGENTA_MUSHROOM.get().getDefaultState();
  5. private static final BlockState MAGENTA_MUSHROOM_BLOCK = ModBlocks.MAGENTA_MUSHROOM_BLOCK.get().getDefaultState().with(HugeMushroomBlock.DOWN, Boolean.FALSE);
  6. //Vanilla Stuff
  7. private static final BlockState MUSHROOM_STEM = Blocks.MUSHROOM_STEM.getDefaultState().with(HugeMushroomBlock.UP, Boolean.FALSE).with(HugeMushroomBlock.DOWN, Boolean.FALSE);
  8. }
  9.  
  10. //Configured Features
  11. public static final class Configured {
  12. //Configured Trees
  13. public static final ConfiguredFeature<?, ?> HUGE_MAGENTA_MUSHROOM = Feature.HUGE_RED_MUSHROOM.withConfiguration(new BigMushroomFeatureConfig(new SimpleBlockStateProvider(States.MAGENTA_MUSHROOM_BLOCK), new SimpleBlockStateProvider(States.MUSHROOM_STEM), 2));
  14. //Configured Flowers
  15. public static final ConfiguredFeature<?, ?> MAGENTA_MUSHROOMS = Feature.RANDOM_PATCH.withConfiguration((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(States.MAGENTA_MUSHROOM), SimpleBlockPlacer.PLACER)).tries(64).func_227317_b_().build());
  16. public static final ConfiguredFeature<?, ?> MAGENTA_MUSHROOM_PATCH = MAGENTA_MUSHROOMS.withPlacement(Features.Placements.PATCH_PLACEMENT).chance(8);
  17.  
  18. private static <FC extends IFeatureConfig> void register(String name, ConfiguredFeature<FC, ?> configuredFeature) {
  19. Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, new ResourceLocation(MysticsBiomes.MOD_ID, name), configuredFeature);
  20. }
  21. public static void registerConfiguredFeatures() {
  22. register("magenta_mushrooms", MAGENTA_MUSHROOMS);
  23. register("magenta_mushroom_patch", MAGENTA_MUSHROOM_PATCH);
  24. register("huge_magenta_mushroom", HUGE_MAGENTA_MUSHROOM);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement