Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //BlockStates
- public static final class States {
- //Flower Stuff
- private static final BlockState MAGENTA_MUSHROOM = ModBlocks.MAGENTA_MUSHROOM.get().getDefaultState();
- private static final BlockState MAGENTA_MUSHROOM_BLOCK = ModBlocks.MAGENTA_MUSHROOM_BLOCK.get().getDefaultState().with(HugeMushroomBlock.DOWN, Boolean.FALSE);
- //Vanilla Stuff
- private static final BlockState MUSHROOM_STEM = Blocks.MUSHROOM_STEM.getDefaultState().with(HugeMushroomBlock.UP, Boolean.FALSE).with(HugeMushroomBlock.DOWN, Boolean.FALSE);
- }
- //Configured Features
- public static final class Configured {
- //Configured Trees
- 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));
- //Configured Flowers
- 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());
- public static final ConfiguredFeature<?, ?> MAGENTA_MUSHROOM_PATCH = MAGENTA_MUSHROOMS.withPlacement(Features.Placements.PATCH_PLACEMENT).chance(8);
- private static <FC extends IFeatureConfig> void register(String name, ConfiguredFeature<FC, ?> configuredFeature) {
- Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, new ResourceLocation(MysticsBiomes.MOD_ID, name), configuredFeature);
- }
- public static void registerConfiguredFeatures() {
- register("magenta_mushrooms", MAGENTA_MUSHROOMS);
- register("magenta_mushroom_patch", MAGENTA_MUSHROOM_PATCH);
- register("huge_magenta_mushroom", HUGE_MAGENTA_MUSHROOM);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement