Made the Origin Hills sand/gravel generation slightly more authentic to Alpha, removed the Origin Beach (No longer needed)

This commit is contained in:
Forstride 2020-07-13 11:49:24 -04:00
parent fd099a00d5
commit fb1412909f
12 changed files with 165 additions and 128 deletions

View file

@ -46,7 +46,6 @@ public class BOPBiomes
public static Optional<Biome> oasis = Optional.empty();
public static Optional<Biome> ominous_woods = Optional.empty();
public static Optional<Biome> orchard = Optional.empty();
public static Optional<Biome> origin_beach = Optional.empty();
public static Optional<Biome> origin_hills = Optional.empty();
public static Optional<Biome> outback = Optional.empty();
public static Optional<Biome> overgrown_cliffs = Optional.empty();

View file

@ -1,100 +0,0 @@
/*******************************************************************************
* Copyright 2014-2019, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.biome.overworld;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.common.biome.BiomeBOP;
import com.google.common.collect.Lists;
import net.minecraft.block.Blocks;
import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.EntityType;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeAmbience;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.biome.MoodSoundAmbience;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.carver.WorldCarver;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placement.ChanceConfig;
import net.minecraft.world.gen.placement.CountRangeConfig;
import net.minecraft.world.gen.placement.FrequencyConfig;
import net.minecraft.world.gen.placement.Placement;
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class OriginBeachBiome extends BiomeBOP
{
public OriginBeachBiome()
{
super((new Biome.Builder()).surfaceBuilder(new ConfiguredSurfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.CONFIG_DESERT)).precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.NONE).depth(0.0F).scale(0.025F).temperature(0.6F).downfall(0.6F).specialEffects((new BiomeAmbience.Builder()).waterColor(0x0E31FF).waterFogColor(0x070059).fogColor(0xB0CFFF).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()).parent((String)null));
// Underground
this.addCarver(GenerationStage.Carving.AIR, Biome.makeCarver(WorldCarver.CAVE, new ProbabilityConfig(0.14285715F)));
DefaultBiomeFeatures.addDefaultMonsterRoom(this);
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.DISK.configured(new SphereReplaceConfig(Blocks.SAND.defaultBlockState(), 7, 2, Lists.newArrayList(Blocks.DIRT.defaultBlockState(), BOPBlocks.origin_grass_block.defaultBlockState()))).decorated(Placement.COUNT_TOP_SOLID.configured(new FrequencyConfig(3))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.DISK.configured(new SphereReplaceConfig(Blocks.CLAY.defaultBlockState(), 4, 1, Lists.newArrayList(Blocks.DIRT.defaultBlockState(), Blocks.CLAY.defaultBlockState()))).decorated(Placement.COUNT_TOP_SOLID.configured(new FrequencyConfig(1))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.DISK.configured(new SphereReplaceConfig(Blocks.GRAVEL.defaultBlockState(), 6, 2, Lists.newArrayList(Blocks.DIRT.defaultBlockState(), BOPBlocks.origin_grass_block.defaultBlockState()))).decorated(Placement.COUNT_TOP_SOLID.configured(new FrequencyConfig(1))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.DIRT.defaultBlockState(), 33)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(10, 0, 0, 256))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.GRAVEL.defaultBlockState(), 33)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(8, 0, 0, 256))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.COAL_ORE.defaultBlockState(), 17)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(20, 0, 0, 128))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.IRON_ORE.defaultBlockState(), 9)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(20, 0, 0, 64))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.GOLD_ORE.defaultBlockState(), 9)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(2, 0, 0, 32))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.REDSTONE_ORE.defaultBlockState(), 8)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(8, 0, 0, 16))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.DIAMOND_ORE.defaultBlockState(), 8)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(1, 0, 0, 16))));
////////////////////////////////////////////////////////////
// Vegetation
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(DefaultBiomeFeatures.SUGAR_CANE_CONFIG).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(5))));
////////////////////////////////////////////////////////////
// Other Features
DefaultBiomeFeatures.addDefaultSprings(this);
DefaultBiomeFeatures.addSurfaceFreezing(this);
// Entities
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4));
this.addSpawn(EntityClassification.CREATURE, new Biome.SpawnListEntry(EntityType.COW, 8, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
this.setBeachBiome((Biome)null);
this.setRiverBiome((Biome)null);
}
@OnlyIn(Dist.CLIENT)
@Override
public int getSkyColor()
{
return 0x8CBDFF;
}
@OnlyIn(Dist.CLIENT)
@Override
public int getGrassColor(double x, double z)
{
return 0x9AFF5F;
}
@OnlyIn(Dist.CLIENT)
@Override
public int getFoliageColor()
{
return 0x3AFF00;
}
}

View file

@ -34,15 +34,13 @@ public class OriginHillsBiome extends BiomeBOP
{
public OriginHillsBiome()
{
super((new Biome.Builder()).surfaceBuilder(new ConfiguredSurfaceBuilder(SurfaceBuilder.DEFAULT, BOPBiomeFeatures.ORIGIN_GRASS_SURFACE)).precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.NONE).depth(0.1F).scale(0.2F).temperature(0.6F).downfall(0.6F).specialEffects((new BiomeAmbience.Builder()).waterColor(0x0E31FF).waterFogColor(0x070059).fogColor(0xB0CFFF).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()).parent((String)null));
super((new Biome.Builder()).surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.ORIGIN_HILLS_SURFACE_BUILDER, BOPBiomeFeatures.ORIGIN_GRASS_SURFACE)).precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.NONE).depth(0.1F).scale(0.2F).temperature(0.6F).downfall(0.6F).specialEffects((new BiomeAmbience.Builder()).waterColor(0x0E31FF).waterFogColor(0x070059).fogColor(0xB0CFFF).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()).parent((String)null));
// Underground
this.addCarver(GenerationStage.Carving.AIR, Biome.makeCarver(WorldCarver.CAVE, new ProbabilityConfig(0.14285715F)));
this.addCarver(GenerationStage.Carving.AIR, Biome.makeCarver(BOPBiomeFeatures.ORIGIN_CAVE, new ProbabilityConfig(0.14285715F)));
DefaultBiomeFeatures.addDefaultMonsterRoom(this);
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.DISK.configured(new SphereReplaceConfig(Blocks.SAND.defaultBlockState(), 7, 2, Lists.newArrayList(Blocks.DIRT.defaultBlockState(), BOPBlocks.origin_grass_block.defaultBlockState()))).decorated(Placement.COUNT_TOP_SOLID.configured(new FrequencyConfig(3))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.DISK.configured(new SphereReplaceConfig(Blocks.CLAY.defaultBlockState(), 4, 1, Lists.newArrayList(Blocks.DIRT.defaultBlockState(), Blocks.CLAY.defaultBlockState()))).decorated(Placement.COUNT_TOP_SOLID.configured(new FrequencyConfig(1))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.DISK.configured(new SphereReplaceConfig(Blocks.GRAVEL.defaultBlockState(), 6, 2, Lists.newArrayList(Blocks.DIRT.defaultBlockState(), BOPBlocks.origin_grass_block.defaultBlockState()))).decorated(Placement.COUNT_TOP_SOLID.configured(new FrequencyConfig(1))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.DIRT.defaultBlockState(), 33)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(10, 0, 0, 256))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, Blocks.GRAVEL.defaultBlockState(), 33)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(8, 0, 0, 256))));
@ -77,7 +75,7 @@ public class OriginHillsBiome extends BiomeBOP
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
this.setBeachBiome(BOPBiomes.origin_beach);
this.setBeachBiome((Biome)null);
this.setRiverBiome((Biome)null);
}

View file

@ -13,10 +13,9 @@ import net.minecraft.block.Blocks;
import net.minecraft.block.LeavesBlock;
import net.minecraft.block.SaplingBlock;
import net.minecraft.util.Direction;
import net.minecraft.world.gen.feature.BaseTreeFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.FlowersFeature;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import net.minecraft.world.gen.carver.CaveWorldCarver;
import net.minecraft.world.gen.carver.WorldCarver;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig;
@ -178,6 +177,7 @@ public class BOPBiomeFeatures
public static final SurfaceBuilder<SurfaceBuilderConfig> POPPY_FIELD_SURFACE_BUILDER = new PoppyFieldSurfaceBuilder(SurfaceBuilderConfig.CODEC);
public static final SurfaceBuilder<SurfaceBuilderConfig> WITHERED_ABYSS_SURFACE_BUILDER = new WitheredAbyssSurfaceBuilder(SurfaceBuilderConfig.CODEC);
public static final SurfaceBuilder<SurfaceBuilderConfig> FLESH_SURFACE_BUILDER = new FleshSurfaceBuilder(SurfaceBuilderConfig.CODEC);
public static final SurfaceBuilder<SurfaceBuilderConfig> ORIGIN_HILLS_SURFACE_BUILDER = new OriginHillsSurfaceBuilder(SurfaceBuilderConfig.CODEC);
public static final SurfaceBuilderConfig BLACKSTONE_SURFACE = new SurfaceBuilderConfig(Blocks.BLACKSTONE.defaultBlockState(), Blocks.BLACKSTONE.defaultBlockState(), Blocks.BLACKSTONE.defaultBlockState());
public static final SurfaceBuilderConfig BASALT_SURFACE = new SurfaceBuilderConfig(Blocks.BASALT.defaultBlockState(), Blocks.BASALT.defaultBlockState(), Blocks.GRAVEL.defaultBlockState());
@ -195,4 +195,7 @@ public class BOPBiomeFeatures
public static final FlowersFeature ORANGE_COSMOS_FEATURE = new OrangeCosmosFeature();
public static final FlowersFeature WILDFLOWER_FEATURE = new WildflowerFeature();
public static final FlowersFeature POPPY_FEATURE = new PoppyFeature();
//Carvers
public static final WorldCarver<ProbabilityConfig> ORIGIN_CAVE = new OriginCaveWorldCarver(ProbabilityConfig.CODEC, 256);
}

View file

@ -0,0 +1,33 @@
package biomesoplenty.common.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import com.google.common.collect.ImmutableSet;
import com.mojang.serialization.Codec;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.tags.FluidTags;
import net.minecraft.world.gen.carver.CaveWorldCarver;
import net.minecraft.world.gen.feature.ProbabilityConfig;
import java.util.Set;
public class OriginCaveWorldCarver extends CaveWorldCarver
{
protected Set<Block> replaceableBlocks = ImmutableSet.of(BOPBlocks.origin_grass_block, Blocks.STONE, Blocks.GRANITE, Blocks.DIORITE, Blocks.ANDESITE, Blocks.DIRT, Blocks.COARSE_DIRT, Blocks.PODZOL, Blocks.GRASS_BLOCK, Blocks.TERRACOTTA, Blocks.WHITE_TERRACOTTA, Blocks.ORANGE_TERRACOTTA, Blocks.MAGENTA_TERRACOTTA, Blocks.LIGHT_BLUE_TERRACOTTA, Blocks.YELLOW_TERRACOTTA, Blocks.LIME_TERRACOTTA, Blocks.PINK_TERRACOTTA, Blocks.GRAY_TERRACOTTA, Blocks.LIGHT_GRAY_TERRACOTTA, Blocks.CYAN_TERRACOTTA, Blocks.PURPLE_TERRACOTTA, Blocks.BLUE_TERRACOTTA, Blocks.BROWN_TERRACOTTA, Blocks.GREEN_TERRACOTTA, Blocks.RED_TERRACOTTA, Blocks.BLACK_TERRACOTTA, Blocks.SANDSTONE, Blocks.RED_SANDSTONE, Blocks.MYCELIUM, Blocks.SNOW, Blocks.PACKED_ICE);
public OriginCaveWorldCarver(Codec<ProbabilityConfig> p_i231917_1_, int p_i231917_2_)
{
super(p_i231917_1_, p_i231917_2_);
}
@Override
protected boolean canReplaceBlock(BlockState p_222706_1_) {
return this.replaceableBlocks.contains(p_222706_1_.getBlock());
}
@Override
protected boolean canReplaceBlock(BlockState state, BlockState aboveState) {
return this.canReplaceBlock(state) || (state.is(Blocks.SAND) || state.is(Blocks.GRAVEL)) && !aboveState.getFluidState().is(FluidTags.WATER);
}
}

View file

@ -0,0 +1,104 @@
package biomesoplenty.common.world.gen.feature;
import com.mojang.serialization.Codec;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.IChunk;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig;
import java.util.Random;
public class OriginHillsSurfaceBuilder extends SurfaceBuilder<SurfaceBuilderConfig>
{
public OriginHillsSurfaceBuilder(Codec<SurfaceBuilderConfig> p_i232124_1_)
{
super(p_i232124_1_);
}
public void apply(Random random, IChunk chunkIn, Biome biomeIn, int x, int z, int startHeight, double noise, BlockState defaultBlock, BlockState defaultFluid, int seaLevel, long seed, SurfaceBuilderConfig config) {
this.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, config.getTopMaterial(), config.getUnderMaterial(), config.getUnderwaterMaterial(), seaLevel);
}
protected void apply(Random random, IChunk chunkIn, Biome biomeIn, int x, int z, int startHeight, double noise, BlockState defaultBlock, BlockState defaultFluid, BlockState top, BlockState middle, BlockState bottom, int sealevel) {
BlockState blockstate = top;
BlockState blockstate1 = middle;
BlockPos.Mutable blockpos$mutable = new BlockPos.Mutable();
int i = -1;
int j = (int)(noise / 3.0D + 3.0D + random.nextDouble() * 0.25D);
int k = x & 15;
int l = z & 15;
boolean gravelGen = noise + random.nextDouble() * 0.20000000000000001D < -2.0D;
boolean sandGen = noise + random.nextDouble() * 0.20000000000000001D > 1.5D;
for (int i1 = startHeight; i1 >= 0; --i1)
{
blockpos$mutable.set(k, i1, l);
BlockState blockstate2 = chunkIn.getBlockState(blockpos$mutable);
if (blockstate2.isAir())
{
i = -1;
}
else if (blockstate2.is(defaultBlock.getBlock()))
{
if (i == -1)
{
if (j <= 0)
{
blockstate = Blocks.AIR.defaultBlockState();
blockstate1 = defaultBlock;
}
else if (i1 >= sealevel - 4 && i1 <= sealevel + 1)
{
blockstate = top;
blockstate1 = middle;
if (gravelGen)
{
blockstate = Blocks.AIR.defaultBlockState();
blockstate1 = Blocks.GRAVEL.defaultBlockState();
}
if (sandGen)
{
blockstate = Blocks.SAND.defaultBlockState();
blockstate1 = Blocks.SAND.defaultBlockState();
}
}
if (i1 < sealevel && (blockstate == null || blockstate.isAir()))
{
if (biomeIn.getTemperature(blockpos$mutable.set(x, i1, z)) < 0.15F)
{
blockstate = Blocks.ICE.defaultBlockState();
}
else
{
blockstate = defaultFluid;
}
blockpos$mutable.set(k, i1, l);
}
i = j;
if (i1 >= sealevel - 1)
{
chunkIn.setBlockState(blockpos$mutable, blockstate, false);
}
else
{
chunkIn.setBlockState(blockpos$mutable, blockstate1, false);
}
}
else if (i > 0)
{
--i;
chunkIn.setBlockState(blockpos$mutable, blockstate1, false);
}
}
}
}
}

View file

@ -62,7 +62,6 @@ public class ModBiomes
{
//Technical Biomes (Need to be registered before main biomes that use them)
registerTechnicalBiome(new GravelBeachBiome(), "gravel_beach");
registerTechnicalBiome(new OriginBeachBiome(), "origin_beach");
registerTechnicalBiome(new TropicBeachBiome(), "tropic_beach");
registerTechnicalBiome(new AlpsFoothillsBiome(), "alps_foothills");
registerTechnicalBiome(new RedwoodForestEdgeBiome(), "redwood_forest_edge");
@ -243,7 +242,6 @@ public class ModBiomes
registerBiomeToDictionary(oasis, Type.OVERWORLD, Type.SANDY, Type.LUSH, Type.JUNGLE, Type.HOT, Type.SPARSE);
registerBiomeToDictionary(ominous_woods, Type.OVERWORLD, Type.MAGICAL, Type.FOREST, Type.SPOOKY, Type.DEAD, Type.DENSE, Type.RARE);
registerBiomeToDictionary(orchard, Type.OVERWORLD, Type.PLAINS);
registerBiomeToDictionary(origin_beach, Type.OVERWORLD, Type.RARE);
registerBiomeToDictionary(origin_hills, Type.OVERWORLD, Type.RARE);
registerBiomeToDictionary(outback, Type.OVERWORLD, Type.SANDY, Type.SAVANNA, Type.HOT, Type.DRY, Type.SPARSE);
registerBiomeToDictionary(overgrown_cliffs, Type.OVERWORLD, Type.MOUNTAIN, Type.HILLS, Type.LUSH, Type.JUNGLE, Type.DENSE, Type.HOT);
@ -319,7 +317,6 @@ public class ModBiomes
registerVillagerType(oasis, IVillagerType.DESERT);
registerVillagerType(ominous_woods, IVillagerType.SWAMP);
registerVillagerType(orchard, IVillagerType.PLAINS);
registerVillagerType(origin_beach, IVillagerType.PLAINS);
registerVillagerType(origin_hills, IVillagerType.PLAINS);
registerVillagerType(outback, IVillagerType.SAVANNA);
registerVillagerType(overgrown_cliffs, IVillagerType.JUNGLE);

View file

@ -10,7 +10,11 @@ package biomesoplenty.init;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import biomesoplenty.core.BiomesOPlenty;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.gen.carver.ICarverConfig;
import net.minecraft.world.gen.carver.WorldCarver;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.ProbabilityConfig;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@ -19,6 +23,13 @@ import net.minecraftforge.registries.ForgeRegistries;
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
public class ModFeatures
{
@SubscribeEvent
public static void registerCarvers(RegistryEvent.Register<WorldCarver<?>> event)
{
//Carvers
registerCarvers(BOPBiomeFeatures.ORIGIN_CAVE, "origin_cave");
}
@SubscribeEvent
public static void registerFeatures(RegistryEvent.Register<Feature<?>> event)
{
@ -169,6 +180,12 @@ public class ModFeatures
registerFeatures(BOPBiomeFeatures.POPPY_FEATURE, "poppy_feature");
}
public static WorldCarver<?> registerCarvers(WorldCarver<?> entry, String name)
{
entry.setRegistryName(new ResourceLocation(BiomesOPlenty.MOD_ID, name));
ForgeRegistries.WORLD_CARVERS.register(entry);
return entry;
}
public static Feature<?> registerFeatures(Feature<?> entry, String name)
{

View file

@ -368,7 +368,7 @@ public class ModVanillaCompat
{
for (Biome biome : BiomeDictionary.getBiomes(type))
{
if (biome != BOPBiomes.origin_beach.get() && biome != BOPBiomes.origin_hills.get())
if (biome != BOPBiomes.origin_hills.get())
{
biome.addFeature(decorationStage, featureIn);
}

View file

@ -41,7 +41,6 @@
"biome.biomesoplenty.oasis": "Oasis",
"biome.biomesoplenty.ominous_woods": "Ominous Woods",
"biome.biomesoplenty.orchard": "Orchard",
"biome.biomesoplenty.origin_beach": "Origin Beach",
"biome.biomesoplenty.origin_hills": "Origin Hills",
"biome.biomesoplenty.outback": "Outback",
"biome.biomesoplenty.overgrown_cliffs": "Overgrown Cliffs",

View file

@ -219,12 +219,6 @@
"biome": "biomesoplenty:orchard"
}
},
"origin_beach": {
"trigger": "minecraft:location",
"conditions": {
"biome": "biomesoplenty:origin_beach"
}
},
"origin_hills": {
"trigger": "minecraft:location",
"conditions": {

View file

@ -218,12 +218,6 @@
"biome": "biomesoplenty:orchard"
}
},
"origin_beach": {
"trigger": "minecraft:location",
"conditions": {
"biome": "biomesoplenty:origin_beach"
}
},
"origin_hills": {
"trigger": "minecraft:location",
"conditions": {
@ -471,7 +465,6 @@
"oasis",
"ominous_woods",
"orchard",
"origin_beach",
"origin_hills",
"outback",
"overgrown_cliffs",