Advertisement
jayhillx

features

Apr 24th, 2022
1,314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.61 KB | None | 0 0
  1. public class MysticFeatures {
  2.  
  3.     public static void registerConfiguredFeatures() {
  4.  
  5.     }
  6.  
  7.     public static void registerPlacedFeatures() {
  8.  
  9.     }
  10.  
  11.     public static final Holder<ConfiguredFeature<TreeConfiguration, ?>> JACARANDA = FeatureUtils.register("jacaranda", Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder(BlockStateProvider.simple(MysticBlocks.JACARANDA_LOG.get()), new StraightTrunkPlacer(4, 2, 0), BlockStateProvider.simple(MysticBlocks.JACARANDA_BLOSSOMS.get()), new BlobFoliagePlacer(ConstantInt.of(2), ConstantInt.of(0), 3), new TwoLayersFeatureSize(1, 0, 1)).build());
  12.     public static final Holder<ConfiguredFeature<RandomPatchConfiguration, ?>> LAVENDER = FeatureUtils.register("lavender", Feature.RANDOM_PATCH, FeatureUtils.simpleRandomPatchConfiguration(32, PlacementUtils.onlyWhenEmpty(Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(MysticBlocks.LAVENDER.get())))));
  13.  
  14.     /** What's placed in the world generation. */
  15.     public static final Holder<PlacedFeature> TREES_JACARANDA = PlacementUtils.register("trees_jacaranda", JACARANDA, VegetationPlacements.treePlacement(RarityFilter.onAverageOnceEvery(60)));
  16.     public static final Holder<PlacedFeature> FLOWERS_LAVENDER = PlacementUtils.register("flowers_lavender", VegetationFeatures.PATCH_GRASS, VegetationPlacements.worldSurfaceSquaredWithCount(2));
  17.  
  18.     private static <FC extends FeatureConfiguration> void register(String name, ConfiguredFeature<FC, ?> feature) {
  19.         BuiltinRegistries.register(BuiltinRegistries.CONFIGURED_FEATURE, new ResourceLocation(MysticsBiomes.modId, name), feature);
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement