Features fixes
This commit is contained in:
parent
35d8c14d20
commit
89ddb7cf33
5 changed files with 22 additions and 8 deletions
|
@ -8,6 +8,7 @@ import net.minecraft.world.gen.decorator.ChanceDecoratorConfig;
|
|||
import net.minecraft.world.gen.decorator.ConfiguredDecorator;
|
||||
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.FeatureConfig;
|
||||
|
@ -31,6 +32,14 @@ public class EndFeature {
|
|||
this.feature = Registry.register(Registry.FEATURE, id, feature);
|
||||
this.featureConfigured = Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, id, feature.configure(FeatureConfig.DEFAULT).decorate(Decorator.CHANCE.configure(new ChanceDecoratorConfig(100))));
|
||||
}
|
||||
|
||||
public EndFeature(String name, Feature<DefaultFeatureConfig> feature, int density) {
|
||||
Identifier id = new Identifier(BetterEnd.MOD_ID, name);
|
||||
this.featureStep = GenerationStep.Feature.VEGETAL_DECORATION;
|
||||
this.feature = Registry.register(Registry.FEATURE, id, feature);
|
||||
this.featureConfigured = Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, id, feature.configure(FeatureConfig.DEFAULT).decorate(ConfiguredFeatures.Decorators.SQUARE_HEIGHTMAP).repeatRandomly(density));
|
||||
//return new EndFeature(name, feature, GenerationStep.Feature.VEGETAL_DECORATION, feature.configure(FeatureConfig.DEFAULT).decorate(ConfiguredFeatures.Decorators.SQUARE_HEIGHTMAP).repeatRandomly(4));
|
||||
}
|
||||
|
||||
public Feature<DefaultFeatureConfig> getFeature() {
|
||||
return feature;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue