类net.minecraft.world.gen.decorator.Decorator源码实例Demo

下面列出了怎么用net.minecraft.world.gen.decorator.Decorator的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: Galacticraft-Rewoven   文件: MoonMareRocksBiome.java
public MoonMareRocksBiome() {
    super((new Settings())
            .configureSurfaceBuilder(GalacticraftSurfaceBuilders.MOON_SURFACE_BUILDER, MOON_MARE_ROCK_CONFIG)
            .precipitation(Precipitation.NONE)
            .category(Category.NONE)
            .depth(0.65F)
            .scale(0.0065F)
            .temperature(-100.0F)
            .downfall(0.00002F)
            .effects(new BiomeEffects.Builder()
                    .waterColor(9937330)
                    .waterFogColor(11243183)
                    .fogColor(0)
                    .build())
            .parent(Constants.MOD_ID + ":" + Constants.Biomes.MOON_HIGHLANDS_ROCKS));
    this.addFeature(GenerationStep.Feature.TOP_LAYER_MODIFICATION, DecoratedFeature.FOREST_ROCK.configure(new ForestRockFeatureConfig(GalacticraftBlocks.MOON_BASALT.getDefaultState(), 6)).createDecoratedFeature(Decorator.WATER_LAKE.configure(new ChanceDecoratorConfig(4))));
}
 
public MoonHighlandsRocksBiome() {
    super((new Settings())
            .configureSurfaceBuilder(SurfaceBuilder.DEFAULT, MOON_HIGHLANDS_ROCK_CONFIG)
            .precipitation(Precipitation.NONE)
            .category(Category.NONE)
            .depth(0.65F)
            .scale(0.0065F)
            .temperature(-100.0F)
            .downfall(0.00002F)
            .effects(new BiomeEffects.Builder()
                    .waterColor(9937330)
                    .waterFogColor(11243183)
                    .fogColor(0)
                    .build())
            .parent(Constants.MOD_ID + ":" + Constants.Biomes.MOON_HIGHLANDS_ROCKS));
    this.addFeature(GenerationStep.Feature.TOP_LAYER_MODIFICATION, DecoratedFeature.FOREST_ROCK.configure(new ForestRockFeatureConfig(GalacticraftBlocks.MOON_ROCK.getDefaultState(), 6)).createDecoratedFeature(Decorator.WATER_LAKE.configure(new ChanceDecoratorConfig(4))));
}
 
源代码3 项目: the-hallow   文件: PumpkinPatchBiome.java
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));
}
 
源代码4 项目: the-hallow   文件: GhastlyDesert.java
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)));
}
 
源代码5 项目: the-hallow   文件: HallowedBiomeFeatures.java
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)));
}
 
源代码6 项目: the-hallow   文件: HallowedBiomeFeatures.java
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
}
 
源代码7 项目: the-hallow   文件: HallowedBiomeFeatures.java
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)));
}
 
源代码8 项目: the-hallow   文件: HallowedBiomeFeatures.java
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
}
 
源代码9 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addDisks(Biome biome) {
	biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, configureFeature(Feature.DISK, new DiskFeatureConfig(HallowedBlocks.TAINTED_SAND.getDefaultState(), 7, 2, Lists.newArrayList(HallowedBlocks.DECEASED_DIRT.getDefaultState(), HallowedBlocks.DECEASED_GRASS_BLOCK.getDefaultState())), Decorator.COUNT_TOP_SOLID, new CountDecoratorConfig(3)));
	biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, configureFeature(Feature.DISK, new DiskFeatureConfig(HallowedBlocks.TAINTED_GRAVEL.getDefaultState(), 6, 2, Lists.newArrayList(HallowedBlocks.DECEASED_DIRT.getDefaultState(), HallowedBlocks.DECEASED_GRASS_BLOCK.getDefaultState())), Decorator.COUNT_TOP_SOLID, new CountDecoratorConfig(1)));
}
 
源代码10 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addDefaultUplandsGeneration(Biome biome) {
	biome.addFeature(GenerationStep.Feature.SURFACE_STRUCTURES, configureFeature(HallowedFeatures.STONE_CIRCLE, FeatureConfig.DEFAULT, Decorator.CHANCE_HEIGHTMAP, new ChanceDecoratorConfig(160)));
}
 
源代码11 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addLakes(Biome biome) {
	biome.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, configureFeature(Feature.LAKE, new SingleStateFeatureConfig(HallowedBlocks.WITCH_WATER_BLOCK.getDefaultState()), Decorator.WATER_LAKE, new ChanceDecoratorConfig(4)));
	biome.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, configureFeature(Feature.LAKE, new SingleStateFeatureConfig(HallowedBlocks.BLOOD_BLOCK.getDefaultState()), Decorator.WATER_LAKE, new ChanceDecoratorConfig(40)));
}
 
源代码12 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addExtraLakes(Biome biome) {
	biome.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, configureFeature(Feature.LAKE, new SingleStateFeatureConfig(HallowedBlocks.WITCH_WATER_BLOCK.getDefaultState()), Decorator.WATER_LAKE, new ChanceDecoratorConfig(2)));
	biome.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, configureFeature(Feature.LAKE, new SingleStateFeatureConfig(HallowedBlocks.BLOOD_BLOCK.getDefaultState()), Decorator.WATER_LAKE, new ChanceDecoratorConfig(20)));
}
 
源代码13 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addWells(Biome biome) {
	biome.addFeature(GenerationStep.Feature.SURFACE_STRUCTURES, configureFeature(HallowedFeatures.WITCH_WELL, FeatureConfig.DEFAULT, Decorator.CHANCE_HEIGHTMAP, new ChanceDecoratorConfig(300)));
}
 
源代码14 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addLairs(Biome biome) {
	biome.addFeature(GenerationStep.Feature.SURFACE_STRUCTURES, configureFeature(HallowedFeatures.SPIDER_LAIR, FeatureConfig.DEFAULT, Decorator.CHANCE_HEIGHTMAP, new ChanceDecoratorConfig(230)));
}
 
源代码15 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addBarrows(Biome biome) {
	biome.addFeature(GenerationStep.Feature.TOP_LAYER_MODIFICATION, configureFeature(HallowedFeatures.BARROW, FeatureConfig.DEFAULT, Decorator.COUNT_EXTRA_HEIGHTMAP, new CountExtraChanceDecoratorConfig(0, 0.35f, 1)));
}
 
源代码16 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addMineables(Biome biome) {
	biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, configureFeature(HallowedFeatures.ORE, new HallowedOreFeatureConfig(HallowedBlocks.DECEASED_DIRT.getDefaultState(), 33), Decorator.COUNT_RANGE, new RangeDecoratorConfig(10, 0, 0, 256)));
	biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, configureFeature(HallowedFeatures.ORE, new HallowedOreFeatureConfig(HallowedBlocks.TAINTED_GRAVEL.getDefaultState(), 33), Decorator.COUNT_RANGE, new RangeDecoratorConfig(8, 0, 0, 256)));
	biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, configureFeature(HallowedFeatures.ORE, new HallowedOreFeatureConfig(HallowedBlocks.INFESTED_TAINTED_STONE.getDefaultState(), 33), Decorator.COUNT_RANGE, new RangeDecoratorConfig(5, 0, 0, 256)));
}
 
源代码17 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addOres(Biome biome) {
	biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, configureFeature(HallowedFeatures.ORE, new HallowedOreFeatureConfig(HallowedBlocks.HALLOWED_ORE.getDefaultState(), 5), Decorator.COUNT_RANGE, new RangeDecoratorConfig(1, 0, 0, 16)));
}
 
源代码18 项目: the-hallow   文件: HallowedBiomeFeatures.java
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)));
}
 
源代码19 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addGloomshrooms(Biome biome) {
	biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, configureFeature(Feature.RANDOM_PATCH, new RandomPatchFeatureConfig.Builder(new SimpleStateProvider(HallowedBlocks.GLOOMSHROOM.getDefaultState()), new SimpleBlockPlacer()).tries(32).build(), Decorator.COUNT_HEIGHTMAP_DOUBLE, new CountDecoratorConfig(1)));
}
 
源代码20 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addColoredPumpkins(Biome biome) {
	biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, configureFeature(HallowedFeatures.COLORED_PUMPKIN, FeatureConfig.DEFAULT, Decorator.CHANCE_HEIGHTMAP_DOUBLE, new ChanceDecoratorConfig(32)));
}
 
源代码21 项目: patchwork-api   文件: MixinDecorator.java
@Override
public IForgeRegistryEntry<Decorator> setRegistryName(Identifier name) {
	this.registryName = name;

	return this;
}
 
源代码22 项目: patchwork-api   文件: MixinDecorator.java
public Identifier getRegistryName() {
	Decorator<?> decorator = (Decorator<?>) (Object) this;

	return Identifiers.getOrFallback(Registry.DECORATOR, decorator, registryName);
}
 
源代码23 项目: patchwork-api   文件: MixinDecorator.java
public Class<Decorator> getRegistryType() {
	return Decorator.class;
}
 
源代码24 项目: the-hallow   文件: HallowedBiomeFeatures.java
public static void addDecoration(Biome biome) {
	
	biome.addFeature(GenerationStep.Feature.VEGETAL_DECORATION, configureFeature(HallowedFeatures.BRAMBLES, FeatureConfig.DEFAULT, Decorator.COUNT_HEIGHTMAP_DOUBLE, new CountDecoratorConfig(2)));
}
 
 类所在包
 类方法
 同包方法