more cleanup of unused features

This commit is contained in:
Justin Parsell 2021-03-21 01:04:46 -04:00
parent 88cfeaf807
commit 16b59becf5
1 changed files with 0 additions and 8 deletions

View File

@ -16,7 +16,6 @@ import net.minecraft.world.gen.decorator.CountExtraDecoratorConfig;
import net.minecraft.world.gen.decorator.Decorator;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import net.minecraft.world.gen.feature.ConfiguredFeatures;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.RandomFeatureConfig;
import net.minecraft.world.gen.feature.TreeFeatureConfig;
@ -24,24 +23,17 @@ import net.minecraft.world.gen.feature.size.TwoLayersFeatureSize;
import net.minecraft.world.gen.foliage.BlobFoliagePlacer;
import net.minecraft.world.gen.stateprovider.SimpleBlockStateProvider;
import net.minecraft.world.gen.trunk.StraightTrunkPlacer;
import net.parsell.cherry.common.features.CherryTree;
public class CherryFeatures {
private static final BlockState CHERRYLOG_STATE = CherryBlocks.CHERRYLOG.getDefaultState();
private static final BlockState CHERRYLEAVES_STATE = CherryBlocks.CHERRYLEAVES.getDefaultState();
// Create the features
private static final Feature<DefaultFeatureConfig> CHERRY_TREE_1 = new CherryTree(DefaultFeatureConfig.CODEC);
// Configure the features
static TreeFeatureConfig CHERRY_TREE_1_CONFIG = new TreeFeatureConfig.Builder(new SimpleBlockStateProvider(CHERRYLOG_STATE), new SimpleBlockStateProvider(CHERRYLEAVES_STATE), new BlobFoliagePlacer(UniformIntDistribution.of(2), UniformIntDistribution.of(0), 3), new StraightTrunkPlacer(4, 2, 0), new TwoLayersFeatureSize(1, 0, 1)).ignoreVines().build();
public static final ConfiguredFeature<?, ?> CHERRY_TREE_1_C = Feature.TREE.configure(CHERRY_TREE_1_CONFIG);
public static final ConfiguredFeature<?, ?> CHERRY_TREE_1_C_R = Feature.RANDOM_SELECTOR.configure(new RandomFeatureConfig(ImmutableList.of(CHERRY_TREE_1_C.withChance(0.8F)), CHERRY_TREE_1_C)).decorate(ConfiguredFeatures.Decorators.SQUARE_HEIGHTMAP).decorate(Decorator.COUNT_EXTRA.configure(new CountExtraDecoratorConfig(1, 0.1F, 1)));
private static void addFeatures(){
// Register the features
Registry.register(Registry.FEATURE, new Identifier("cherry", "cherry_tree"), CHERRY_TREE_1);
// Register the configured features
RegistryKey<ConfiguredFeature<?, ?>> cherryTree1 = RegistryKey.of(Registry.CONFIGURED_FEATURE_WORLDGEN, new Identifier("cherry", "cherry_tree_1"));
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, cherryTree1.getValue(), CHERRY_TREE_1_C_R);