net.minecraft.world.gen.feature.Feature Java Examples

The following examples show how to use net.minecraft.world.gen.feature.Feature. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OverworldChunkGeneratorMixin.java    From carpet-extra with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Inject(
        method = "getEntitySpawnList",
        at = @At(value = "INVOKE", ordinal = 1, shift = At.Shift.BEFORE,
                target = "Lnet/minecraft/world/gen/feature/StructureFeature;isApproximatelyInsideStructure(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;)Z"),
        cancellable = true
)
private void onGetEntitySpawnList(EntityCategory category, BlockPos pos, CallbackInfoReturnable<List<Biome.SpawnEntry>> cir)
{
    if (CarpetExtraSettings.straySpawningInIgloos)
    {
        if (Feature.IGLOO.isApproximatelyInsideStructure(this.world, pos))
        {
            cir.setReturnValue(Feature.IGLOO.getMonsterSpawns());
        }
    }
    
    if (CarpetExtraSettings.creeperSpawningInJungleTemples)
    {
        if (Feature.JUNGLE_TEMPLE.isApproximatelyInsideStructure(this.world, pos))
        {
            cir.setReturnValue(Feature.JUNGLE_TEMPLE.getMonsterSpawns());
        }
    }
}
 
Example #2
Source File: HallowedForestBiome.java    From the-hallow with MIT License 6 votes vote down vote up
public HallowedForestBiome(float depth, float scale) {
	super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.FOREST).depth(depth).scale(scale).temperature(0.7f).downfall(0.8f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	GRASS_COLOR = 0x6B6B6B;
	FOLIAGE_COLOR = 0x6B6B6B;
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addLakes(this);
	HallowedBiomeFeatures.addColoredPumpkins(this);
	HallowedBiomeFeatures.addDefaultHallowedTrees(this);
	HallowedBiomeFeatures.addHallowedForestTrees(this);
	HallowedBiomeFeatures.addWells(this);
	HallowedBiomeFeatures.addLairs(this);
}
 
Example #3
Source File: PumpkinPatchBiome.java    From the-hallow with MIT License 6 votes vote down vote up
public PumpkinPatchBiome() {
	super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.PLAINS).depth(0.125f).scale(0.07f).temperature(0.7f).downfall(0.8f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	GRASS_COLOR = 0xC9C92A;
	FOLIAGE_COLOR = 0xC9C92A;
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addLakes(this);
	//is not the same as other biome pumpkins, do not use HallowedBiomeFeatures pumpkins
	this.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, HallowedBiomeFeatures.configureFeature(HallowedFeatures.COLORED_PUMPKIN, FeatureConfig.DEFAULT, Decorator.COUNT_HEIGHTMAP_DOUBLE, new CountDecoratorConfig(10)));
	HallowedBiomeFeatures.addDefaultHallowedTrees(this);
	
	this.addSpawn(EntityCategory.CREATURE, new SpawnEntry(HallowedEntities.PUMPCOWN, 8, 4, 8));
}
 
Example #4
Source File: MoonCheeseForestBiome.java    From Galacticraft-Rewoven with MIT License 6 votes vote down vote up
public MoonCheeseForestBiome() {
    super((new Settings())
            .configureSurfaceBuilder(SurfaceBuilder.DEFAULT, new TernarySurfaceConfig(GalacticraftBlocks.MOON_TURF.getDefaultState(), GalacticraftBlocks.MOON_DIRT.getDefaultState(), GalacticraftBlocks.MOON_ROCK.getDefaultState()))
            .precipitation(Precipitation.NONE)
            .category(Category.NONE)
            .depth(0.03F)
            .scale(0.03F)
            .temperature(-100F)
            .downfall(0.005F)
            .effects(new BiomeEffects.Builder()
                    .waterColor(9937330)
                    .waterFogColor(11243183)
                    .fogColor(0)
                    .build())
            .parent(null));
    this.flowerFeatures.clear();
    this.addFeature(GenerationStep.Feature.TOP_LAYER_MODIFICATION, Feature.TREE.configure(GalacticraftFeatures.CHEESE_TREE_CONFIG));
}
 
Example #5
Source File: HallowedRiverBiome.java    From the-hallow with MIT License 5 votes vote down vote up
public HallowedRiverBiome() {
	super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.RIVER).depth(-0.5f).scale(0.1f).temperature(0.7f).downfall(0.8f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addLakes(this);
	HallowedBiomeFeatures.addColoredPumpkins(this);
	HallowedBiomeFeatures.addDefaultHallowedTrees(this);
}
 
Example #6
Source File: FloatingIslandsChunkGeneratorMixin.java    From fabric-carpet with MIT License 5 votes vote down vote up
@Override
public List<Biome.SpawnEntry> getEntitySpawnList(EntityCategory entityCategory_1, BlockPos blockPos_1)
{
    if (CarpetSettings.shulkerSpawningInEndCities && EntityCategory.MONSTER == entityCategory_1)
    {
        if (Feature.END_CITY.isInsideStructure(this.world, blockPos_1))
        {
            return Feature.END_CITY.getMonsterSpawns();
        }
    }
    return this.world.getBiome(blockPos_1).getEntitySpawnList(entityCategory_1);
}
 
Example #7
Source File: OverworldChunkGeneratorMixin.java    From fabric-carpet with MIT License 5 votes vote down vote up
@Inject(method = "getEntitySpawnList", at = @At(value = "INVOKE", ordinal = 1, shift = At.Shift.BEFORE,
        target = "Lnet/minecraft/world/gen/feature/StructureFeature;isApproximatelyInsideStructure(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;)Z"),
        cancellable = true)
private void onGetEntitySpawnList(EntityCategory entityCategory_1, BlockPos blockPos_1,
        CallbackInfoReturnable<List<Biome.SpawnEntry>> cir)
{
    if (CarpetSettings.huskSpawningInTemples)
    {
        if (Feature.DESERT_PYRAMID.isApproximatelyInsideStructure(this.world, blockPos_1))
        {
            cir.setReturnValue(Feature.DESERT_PYRAMID.getMonsterSpawns());
        }
    }
}
 
Example #8
Source File: GhastlyDesert.java    From the-hallow with MIT License 5 votes vote down vote up
public GhastlyDesert() {
	super(new Settings().surfaceBuilder(DESERT_SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.DESERT).precipitation(Biome.Precipitation.NONE).category(Biome.Category.DESERT).depth(0.125F).scale(0.05F).temperature(2.0F).downfall(0.0F).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	this.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, HallowedBiomeFeatures.configureFeature(HallowedFeatures.DEADER_BUSH, FeatureConfig.DEFAULT, Decorator.COUNT_HEIGHTMAP_DOUBLE, new CountDecoratorConfig(2)));
	this.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, HallowedBiomeFeatures.configureFeature(HallowedFeatures.RESTLESS_CACTUS, FeatureConfig.DEFAULT, Decorator.COUNT_HEIGHTMAP_DOUBLE, new CountDecoratorConfig(10)));
}
 
Example #9
Source File: HallowedLowlandsBiome.java    From the-hallow with MIT License 5 votes vote down vote up
public HallowedLowlandsBiome() {
	super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.PLAINS).depth(0.125f).scale(0.08f).temperature(0.7f).downfall(0.8f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addLakes(this);
	HallowedBiomeFeatures.addColoredPumpkins(this);
	HallowedBiomeFeatures.addDefaultHallowedTrees(this);
	HallowedBiomeFeatures.addWells(this);
	HallowedBiomeFeatures.addLairs(this);
}
 
Example #10
Source File: HallowedShoreBiome.java    From the-hallow with MIT License 5 votes vote down vote up
public HallowedShoreBiome() {
	super(new Settings().surfaceBuilder(new ConfiguredSurfaceBuilder<TernarySurfaceConfig>(SurfaceBuilder.DEFAULT, TAINTED_GRAVEL_CONFIG)).precipitation(Precipitation.NONE).category(Category.OCEAN).depth(0.02f).scale(0.025f).temperature(0.5f).downfall(0.8f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addLakes(this);
	HallowedBiomeFeatures.addDefaultHallowedTrees(this);
}
 
Example #11
Source File: HallowedSwampBiome.java    From the-hallow with MIT License 5 votes vote down vote up
public HallowedSwampBiome() {
	super(new Settings().surfaceBuilder(MARSH_SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.SWAMP).depth(-0.2f).scale(0.18f).temperature(0.7f).downfall(0.8f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	GRASS_COLOR = 0x2A2A2A;
	FOLIAGE_COLOR = 0x2A2A2A;
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addGloomshrooms(this);
	HallowedBiomeFeatures.addLakes(this);
	HallowedBiomeFeatures.addColoredPumpkins(this);
	HallowedBiomeFeatures.addHallowedSwampTrees(this);
	HallowedBiomeFeatures.addLairs(this);
}
 
Example #12
Source File: HallowedSeaBiome.java    From the-hallow with MIT License 5 votes vote down vote up
public HallowedSeaBiome() {
	super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.OCEAN).depth(-1.2f).scale(0.1f).temperature(0.5f).downfall(0.8f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addLakes(this);
	HallowedBiomeFeatures.addDefaultHallowedTrees(this);
}
 
Example #13
Source File: LowlandBarrowsBiome.java    From the-hallow with MIT License 5 votes vote down vote up
public LowlandBarrowsBiome() {
	super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.PLAINS).depth(0.15f).scale(0.025f).temperature(0.7f).downfall(0.8f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addLakes(this);
	HallowedBiomeFeatures.addColoredPumpkins(this);
	HallowedBiomeFeatures.addDefaultHallowedTrees(this);
	HallowedBiomeFeatures.addWells(this);
	HallowedBiomeFeatures.addLairs(this);
	HallowedBiomeFeatures.addBarrows(this);
}
 
Example #14
Source File: HauntedUplandsBiome.java    From the-hallow with MIT License 5 votes vote down vote up
public HauntedUplandsBiome() {
	super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.PLAINS).depth(1.75f).scale(0.03f).temperature(0.5f).downfall(0.4f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addLakes(this);
	HallowedBiomeFeatures.addColoredPumpkins(this);
	HallowedBiomeFeatures.addDefaultUplandsGeneration(this);
	HallowedBiomeFeatures.addWells(this);
	HallowedBiomeFeatures.addLairs(this);
}
 
Example #15
Source File: HauntedMoorBiome.java    From the-hallow with MIT License 5 votes vote down vote up
public HauntedMoorBiome() {
	super(new Settings().surfaceBuilder(SURFACE_BUILDER).precipitation(Precipitation.NONE).category(Category.PLAINS).depth(3.15f).scale(0.22f).temperature(0.5f).downfall(0.4f).waterColor(0x3F76E4).waterFogColor(0x050533));
	
	this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL)));
	
	HallowedBiomeFeatures.addGrass(this);
	HallowedBiomeFeatures.addExtraLakes(this);
	HallowedBiomeFeatures.addColoredPumpkins(this);
	HallowedBiomeFeatures.addDefaultUplandsGeneration(this);
}
 
Example #16
Source File: OilPoolGenerator.java    From Galacticraft-Rewoven with MIT License 5 votes vote down vote up
public static void registerOilLake() {
    for (Biome biome : Biome.BIOMES) {
        if (!biome.getCategory().equals(Biomes.NETHER_WASTES.getCategory()) && !biome.getCategory().equals(Biomes.THE_END.getCategory())) {

            biome.addFeature(GenerationStep.Feature.UNDERGROUND_DECORATION, new ConfiguredFeature<>((LakeFeature) Feature.LAKE, new SingleStateFeatureConfig(GalacticraftBlocks.CRUDE_OIL.getDefaultState())));
        }
    }
}
 
Example #17
Source File: HallowedBiomeFeatures.java    From the-hallow with MIT License 4 votes vote down vote up
public static void addHallowedSwampTrees(Biome biome) {
	//note: the feature config here is completely irrelevant. The feature ignores it. I've tried to make it at least somewhat similar in case someone does something strange with it.
	biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, configureFeature(HallowedFeatures.SMALL_DEADWOOD_TREE, new BranchedTreeFeatureConfig.Builder(new SimpleStateProvider(HallowedBlocks.DEADWOOD_LOG.getDefaultState()), new SimpleStateProvider(HallowedBlocks.DEADWOOD_LEAVES.getDefaultState()), new BlobFoliagePlacer(2, 0)).baseHeight(4).heightRandA(2).foliageHeight(3).noVines().build(), Decorator.COUNT_EXTRA_HEIGHTMAP, new CountExtraChanceDecoratorConfig(4, 0.1F, 1)));
	// Still needs work as well
}
 
Example #18
Source File: FlatChunkGeneratorMixin.java    From fabric-carpet with MIT License 4 votes vote down vote up
@Override
public List<Biome.SpawnEntry> getEntitySpawnList(EntityCategory category, BlockPos pos)
{
    if (CarpetSettings.flatWorldStructureSpawning)
    {
        if (Feature.SWAMP_HUT.method_14029(this.world, pos))
        {
            if (category == EntityCategory.MONSTER)
            {
                return Feature.SWAMP_HUT.getMonsterSpawns();
            }
    
            if (category == EntityCategory.CREATURE)
            {
                return Feature.SWAMP_HUT.getCreatureSpawns();
            }
        }
        else if (category == EntityCategory.MONSTER)
        {
            if (Feature.PILLAGER_OUTPOST.isApproximatelyInsideStructure(this.world, pos))
            {
                return Feature.PILLAGER_OUTPOST.getMonsterSpawns();
            }

            if (CarpetSettings.huskSpawningInTemples)
            {
                if (Feature.DESERT_PYRAMID.isApproximatelyInsideStructure(this.world, pos))
                {
                    return Feature.DESERT_PYRAMID.getMonsterSpawns();
                }
            }
    
            if (Feature.OCEAN_MONUMENT.isApproximatelyInsideStructure(this.world, pos))
            {
                return Feature.OCEAN_MONUMENT.getMonsterSpawns();
            }

            if (Feature.NETHER_BRIDGE.isInsideStructure(this.world, pos))
            {
                return Feature.NETHER_BRIDGE.getMonsterSpawns();
            }

            if (Feature.NETHER_BRIDGE.isApproximatelyInsideStructure(this.world, pos) && this.world.getBlockState(pos.down(1)).getBlock() == Blocks.NETHER_BRICKS)
            {
                return Feature.NETHER_BRIDGE.getMonsterSpawns();
            }

            if (CarpetSettings.shulkerSpawningInEndCities)
            {
                if (Feature.END_CITY.isInsideStructure(this.world, pos))
                {
                    return Feature.END_CITY.getMonsterSpawns();
                }
            }
        }
    }
    
    return super.getEntitySpawnList(category, pos);
}
 
Example #19
Source File: HallowedBiomeFeatures.java    From the-hallow with MIT License 4 votes vote down vote up
public static <F extends FeatureConfig, D extends DecoratorConfig> ConfiguredFeature<?, ?> configureFeature(Feature<F> feature, F featureConfig, Decorator<D> decorator, D decoratorConfig) {
	Feature<DecoratedFeatureConfig> feature2 = feature instanceof FlowerFeature ? Feature.DECORATED_FLOWER : Feature.DECORATED;
	return new ConfiguredFeature(feature2, new DecoratedFeatureConfig(feature.configure(featureConfig), decorator.configure(decoratorConfig)));
}
 
Example #20
Source File: HuskEntityMixin.java    From fabric-carpet with MIT License 4 votes vote down vote up
@Redirect(method = "canSpawn", at = @At(value = "INVOKE", target="Lnet/minecraft/world/IWorld;isSkyVisible(Lnet/minecraft/util/math/BlockPos;)Z"))
private static boolean isSkylightOrTempleVisible(IWorld iWorld, BlockPos blockPos_1)
{
    return iWorld.isSkyVisible(blockPos_1) ||
            (CarpetSettings.huskSpawningInTemples && Feature.DESERT_PYRAMID.isApproximatelyInsideStructure(iWorld, blockPos_1));
}
 
Example #21
Source File: FeatureGenerator.java    From fabric-carpet with MIT License 4 votes vote down vote up
private static Thing simplePatch(RandomPatchFeatureConfig config)
{
    return simplePlop(Feature.RANDOM_PATCH.configure(config));
}
 
Example #22
Source File: FeatureGenerator.java    From fabric-carpet with MIT License 4 votes vote down vote up
private static Thing simpleTree(BranchedTreeFeatureConfig config)
{
    return simplePlop(Feature.NORMAL_TREE.configure(config));
}
 
Example #23
Source File: FeatureGenerator.java    From fabric-carpet with MIT License 4 votes vote down vote up
private static Thing simplePlop(Feature<DefaultFeatureConfig> feature)
{
    return simplePlop(feature.configure(FeatureConfig.DEFAULT));
}
 
Example #24
Source File: MixinFeature.java    From patchwork-api with GNU Lesser General Public License v2.1 4 votes vote down vote up
public Class<Feature> getRegistryType() {
	return Feature.class;
}
 
Example #25
Source File: MixinFeature.java    From patchwork-api with GNU Lesser General Public License v2.1 4 votes vote down vote up
public Identifier getRegistryName() {
	Feature<?> feature = (Feature<?>) (Object) this;

	return Identifiers.getOrFallback(Registry.FEATURE, feature, registryName);
}
 
Example #26
Source File: MixinFeature.java    From patchwork-api with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public IForgeRegistryEntry<Feature> setRegistryName(Identifier name) {
	this.registryName = name;

	return this;
}
 
Example #27
Source File: StrayEntityMixin.java    From carpet-extra with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Redirect(method = "canSpawn", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/IWorld;isSkyVisible(Lnet/minecraft/util/math/BlockPos;)Z"))
private static boolean isSkylightOrIglooVisible(IWorld iWorld, BlockPos blockPos)
{
    return iWorld.isSkyVisible(blockPos) ||
                   (CarpetExtraSettings.straySpawningInIgloos && Feature.IGLOO.isApproximatelyInsideStructure(iWorld, blockPos));
}
 
Example #28
Source File: HallowedBiomeFeatures.java    From the-hallow with MIT License 4 votes vote down vote up
public static void addDefaultHallowedTrees(Biome biome) {
	//note: the feature config here is completely irrelevant. The feature ignores it. I've tried to make it at least somewhat similar in case someone does something strange with it.
	biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, configureFeature(HallowedFeatures.SMALL_SKELETON_TREE, new TreeFeatureConfig.Builder(new SimpleStateProvider(Blocks.BONE_BLOCK.getDefaultState()), new SimpleStateProvider(Blocks.AIR.getDefaultState())).build(), Decorator.COUNT_EXTRA_HEIGHTMAP, (biome instanceof HallowedForestBiome) ? new CountExtraChanceDecoratorConfig(2, 0.2F, 2) : new CountExtraChanceDecoratorConfig(0, 0.1F, 2)));
	biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, configureFeature(HallowedFeatures.LARGE_SKELETON_TREE, new TreeFeatureConfig.Builder(new SimpleStateProvider(Blocks.BONE_BLOCK.getDefaultState()), new SimpleStateProvider(Blocks.AIR.getDefaultState())).build(), Decorator.COUNT_EXTRA_HEIGHTMAP, (biome instanceof HallowedForestBiome) ? new CountExtraChanceDecoratorConfig(0, 0.5F, 1) : new CountExtraChanceDecoratorConfig(0, 0.01F, 1)));
	//Still needs work
}
 
Example #29
Source File: HallowedBiomeFeatures.java    From the-hallow with MIT License 4 votes vote down vote up
public static void addHallowedForestTrees(Biome biome) {
	//note: the feature config here is completely irrelevant. The feature ignores it. I've tried to make it at least somewhat similar in case someone does something strange with it.
	biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, configureFeature(HallowedFeatures.LARGE_DEADWOOD_TREE, new MegaTreeFeatureConfig.Builder(new SimpleStateProvider(HallowedBlocks.DEADWOOD_LOG.getDefaultState()), new SimpleStateProvider(HallowedBlocks.DEADWOOD_LEAVES.getDefaultState())).baseHeight(6).build(), Decorator.COUNT_EXTRA_HEIGHTMAP, new CountExtraChanceDecoratorConfig(1, 0.05F, 1)));
}
 
Example #30
Source File: HallowedBiomeFeatures.java    From the-hallow with MIT License 4 votes vote down vote up
public static void addGrass(Biome biome) {
	biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, configureFeature(Feature.RANDOM_PATCH, new RandomPatchFeatureConfig.Builder(new SimpleStateProvider(HallowedBlocks.EERIE_GRASS.getDefaultState()), new SimpleBlockPlacer()).tries(32).build(), Decorator.COUNT_HEIGHTMAP_DOUBLE, new CountDecoratorConfig(1)));
	biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, configureFeature(Feature.RANDOM_PATCH, new RandomPatchFeatureConfig.Builder(new SimpleStateProvider(HallowedBlocks.TALL_EERIE_GRASS.getDefaultState()), new SimpleBlockPlacer()).tries(64).cannotProject().build(), Decorator.COUNT_HEIGHTMAP_DOUBLE, new CountDecoratorConfig(1)));
}