Moved to 1.16.3, register surface builders
This commit is contained in:
parent
045c804f14
commit
95347887f8
44 changed files with 159 additions and 102 deletions
|
@ -5,9 +5,9 @@ org.gradle.daemon=false
|
|||
|
||||
mod_version=12.0.0
|
||||
|
||||
minecraft_version=1.16.2
|
||||
minecraft_version=1.16.3
|
||||
minecraft_version_toml=16
|
||||
forge_version=33.0.37
|
||||
forge_version_toml=33
|
||||
forge_version=34.0.9
|
||||
forge_version_toml=34
|
||||
forge_group=net.minecraftforge
|
||||
mappings_version=2-1.16.2
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
******************************************************************************/
|
||||
package biomesoplenty.api.biome;
|
||||
|
||||
import biomesoplenty.core.BiomesOPlenty;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
@ -89,6 +90,6 @@ public class BOPBiomes
|
|||
|
||||
private static RegistryKey<Biome> register(String name)
|
||||
{
|
||||
return RegistryKey.create(Registry.BIOME_REGISTRY, new ResourceLocation(name));
|
||||
return RegistryKey.create(Registry.BIOME_REGISTRY, new ResourceLocation(BiomesOPlenty.MOD_ID, name));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,8 +51,9 @@ public class BiomeRegistry
|
|||
public static void deferSubBiomeRegistration(RegistryKey<Biome> parent, RegistryKey<Biome> child, int weight, float rarity)
|
||||
{
|
||||
// Don't register sub biome if the parent or child don't exist
|
||||
if (!BiomeUtil.exists(parent) || !BiomeUtil.exists(child))
|
||||
if (!BiomeUtil.exists(parent) || !BiomeUtil.exists(child)) {
|
||||
return;
|
||||
}
|
||||
|
||||
defer(RegistrationType.SUB_BIOME, new SubBiomeRegistrationData(parent, child, weight, rarity));
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package biomesoplenty.common.biome.nether;
|
|||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.NetherBiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.client.audio.BackgroundMusicTracks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -35,7 +36,7 @@ public class VisceralHeapBiome extends NetherBiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.FLESH_SURFACE_BUILDER, SurfaceBuilder.CONFIG_HELL));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.FLESH, SurfaceBuilder.CONFIG_HELL));
|
||||
|
||||
//Terrain
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_NETHER);
|
||||
|
|
|
@ -3,6 +3,7 @@ package biomesoplenty.common.biome.nether;
|
|||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.NetherBiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.client.audio.BackgroundMusicTracks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -34,7 +35,7 @@ public class WitheredAbyssBiome extends NetherBiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.WITHERED_ABYSS_SURFACE_BUILDER, BOPBiomeFeatures.BLACKSTONE_SURFACE));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.WITHERED_ABYSS, BOPSurfaceBuilders.BLACKSTONE_SURFACE));
|
||||
|
||||
//Terrain
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_NETHER);
|
||||
|
|
|
@ -9,7 +9,7 @@ package biomesoplenty.common.biome.overworld;
|
|||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.*;
|
||||
|
@ -36,7 +36,7 @@ public class AlpsBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.DEEP_TOP_LAYER, BOPBiomeFeatures.SNOW_SNOW_GRAVEL_SURFACE));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.DEEP_TOP_LAYER, BOPSurfaceBuilders.SNOW_SNOW_GRAVEL_SURFACE));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -13,6 +13,7 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
|
@ -45,7 +46,7 @@ public class BrushlandBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.BRUSHLAND_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.BRUSHLAND, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
builder.addStructureStart(StructureFeatures.VILLAGE_SAVANNA);
|
||||
|
|
|
@ -13,6 +13,7 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -43,7 +44,7 @@ public class ChaparralBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.CHAPARRAL_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.CHAPARRAL, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -9,8 +9,8 @@ package biomesoplenty.common.biome.overworld;
|
|||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.WastelandGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -43,7 +43,7 @@ public class ColdDesertBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.COLD_DESERT_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRAVEL));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.COLD_DESERT, SurfaceBuilder.CONFIG_GRAVEL));
|
||||
|
||||
// Structures
|
||||
builder.addStructureStart(StructureFeatures.VILLAGE_SNOWY);
|
||||
|
|
|
@ -13,6 +13,7 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
|
@ -45,7 +46,7 @@ public class GroveBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.PODZOL_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.PODZOL, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
builder.addStructureStart(StructureFeatures.VILLAGE_PLAINS);
|
||||
|
|
|
@ -13,9 +13,8 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -46,7 +45,7 @@ public class MangroveBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.MANGROVE_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.MANGROVE, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -11,8 +11,8 @@ import biomesoplenty.api.block.BOPBlocks;
|
|||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -21,7 +21,6 @@ import net.minecraft.world.gen.GenerationStage;
|
|||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.placement.ChanceConfig;
|
||||
import net.minecraft.world.gen.placement.IPlacementConfig;
|
||||
import net.minecraft.world.gen.placement.Placement;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
@ -45,7 +44,7 @@ public class MarshBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.MARSH_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.MARSH, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -13,9 +13,8 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -48,7 +47,7 @@ public class MireBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.MUD_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.MUD, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
builder.addStructureStart(StructureFeatures.SWAMP_HUT);
|
||||
|
|
|
@ -13,9 +13,8 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -48,7 +47,7 @@ public class MuskegBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.PODZOL_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.PODZOL, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -7,11 +7,10 @@
|
|||
******************************************************************************/
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -41,7 +40,7 @@ public class OriginHillsBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.ORIGIN_HILLS_SURFACE_BUILDER, BOPBiomeFeatures.ORIGIN_GRASS_SURFACE));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.ORIGIN_HILLS, BOPSurfaceBuilders.ORIGIN_GRASS_SURFACE));
|
||||
|
||||
// Underground
|
||||
builder.addCarver(GenerationStage.Carving.AIR, BOPBiomeFeatures.ORIGIN_CAVE.configured(new ProbabilityConfig(0.14285715F)));
|
||||
|
|
|
@ -12,6 +12,7 @@ import biomesoplenty.api.enums.BOPClimates;
|
|||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
|
@ -47,7 +48,7 @@ public class OutbackBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(SurfaceBuilder.DEFAULT, BOPBiomeFeatures.RED_SAND_SURFACE));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(SurfaceBuilder.DEFAULT, BOPSurfaceBuilders.RED_SAND_SURFACE));
|
||||
|
||||
// Structures
|
||||
builder.addStructureStart(StructureFeatures.VILLAGE_SAVANNA);
|
||||
|
|
|
@ -13,6 +13,7 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
|
@ -45,7 +46,7 @@ public class OvergrownCliffsBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.TERRACOTTA_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.TERRACOTTA, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
builder.addStructureStart(StructureFeatures.JUNGLE_TEMPLE);
|
||||
|
|
|
@ -13,6 +13,7 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -44,7 +45,7 @@ public class PoppyFieldBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.POPPY_FIELD_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.POPPY_FIELD, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -11,6 +11,7 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.FernGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
|
@ -38,7 +39,7 @@ public class RedwoodForestEdgeBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.PODZOL_SURFACE_BUILDER, SurfaceBuilder.CONFIG_PODZOL));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.PODZOL, SurfaceBuilder.CONFIG_PODZOL));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -14,6 +14,7 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
|
@ -46,7 +47,7 @@ public class ShieldBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.CHAPARRAL_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.CHAPARRAL, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -10,6 +10,7 @@ package biomesoplenty.common.biome.overworld;
|
|||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.*;
|
||||
|
@ -39,7 +40,7 @@ public class TropicBeachBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.TROPICS_SURFACE_BUILDER, BOPBiomeFeatures.WHITE_SAND_SURFACE));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.TROPICS, BOPSurfaceBuilders.WHITE_SAND_SURFACE));
|
||||
|
||||
|
||||
// Structures
|
||||
|
|
|
@ -13,6 +13,7 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
|
@ -45,7 +46,7 @@ public class TropicsBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.TROPICS_SURFACE_BUILDER, SurfaceBuilder.CONFIG_GRASS));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.TROPICS, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -12,6 +12,7 @@ import biomesoplenty.common.biome.BiomeTemplate;
|
|||
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -21,8 +22,6 @@ import net.minecraft.world.gen.feature.*;
|
|||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.placement.*;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class VolcanicPlainsBiome extends BiomeTemplate
|
||||
{
|
||||
|
@ -43,7 +42,7 @@ public class VolcanicPlainsBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.BLACK_SAND_SURFACE_BUILDER, BOPBiomeFeatures.BLACK_SAND_SURFACE));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.BLACK_SAND, BOPSurfaceBuilders.BLACK_SAND_SURFACE));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -10,6 +10,7 @@ package biomesoplenty.common.biome.overworld;
|
|||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
|
@ -42,7 +43,7 @@ public class VolcanoBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPBiomeFeatures.VOLCANO_SURFACE_BUILDER, BOPBiomeFeatures.BASALT_SURFACE));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.VOLCANO, BOPSurfaceBuilders.BASALT_SURFACE));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -11,6 +11,7 @@ import biomesoplenty.api.enums.BOPClimates;
|
|||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.WastelandGrassFeature;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
@ -43,7 +44,7 @@ public class WastelandBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(SurfaceBuilder.DEFAULT, BOPBiomeFeatures.DRIED_SALT_SURFACE));
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(SurfaceBuilder.DEFAULT, BOPSurfaceBuilders.DRIED_SALT_SURFACE));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
|
|
|
@ -10,11 +10,11 @@ package biomesoplenty.common.util.biome;
|
|||
import biomesoplenty.common.biome.BiomeMetadata;
|
||||
import biomesoplenty.init.ModBiomes;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.registry.DynamicRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.WorldGenRegistries;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.ForgeRegistry;
|
||||
|
||||
public class BiomeUtil
|
||||
{
|
||||
|
@ -30,17 +30,23 @@ public class BiomeUtil
|
|||
|
||||
public static Biome getBiome(RegistryKey<Biome> key)
|
||||
{
|
||||
return WorldGenRegistries.BIOME.get(key);
|
||||
Biome biome = ForgeRegistries.BIOMES.getValue(key.location());
|
||||
if (biome == null) throw new RuntimeException("Attempted to get unregistered biome " + key);
|
||||
return biome;
|
||||
}
|
||||
|
||||
public static Biome getBiome(int id)
|
||||
{
|
||||
return WorldGenRegistries.BIOME.byId(id);
|
||||
if (id == -1) throw new RuntimeException("Attempted to get biome with id -1");
|
||||
return getBiome(((ForgeRegistry<Biome>)ForgeRegistries.BIOMES).getKey(id));
|
||||
}
|
||||
|
||||
public static int getBiomeId(Biome biome)
|
||||
{
|
||||
return WorldGenRegistries.BIOME.getId(biome);
|
||||
if (biome == null) throw new RuntimeException("Attempted to get id of null biome");
|
||||
int id = ((ForgeRegistry<Biome>)ForgeRegistries.BIOMES).getID(biome);
|
||||
if (id == -1) throw new RuntimeException("Biome id is -1 for biome " + biome.delegate.name());
|
||||
return id;
|
||||
}
|
||||
|
||||
public static int getBiomeId(RegistryKey<Biome> key)
|
||||
|
@ -70,7 +76,7 @@ public class BiomeUtil
|
|||
|
||||
public static boolean exists(RegistryKey<Biome> key)
|
||||
{
|
||||
return WorldGenRegistries.BIOME.containsKey(key.location());
|
||||
return ForgeRegistries.BIOMES.containsKey(key.location());
|
||||
}
|
||||
|
||||
public static boolean exists(int id)
|
||||
|
|
|
@ -13,11 +13,14 @@ import com.google.common.collect.ImmutableList;
|
|||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.util.registry.DynamicRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.WorldGenRegistries;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biomes;
|
||||
import net.minecraft.world.biome.provider.BiomeProvider;
|
||||
import net.minecraft.world.gen.layer.Layer;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -34,12 +37,14 @@ public class BOPBiomeProvider extends BiomeProvider
|
|||
|
||||
private final long seed;
|
||||
private final Layer noiseBiomeLayer;
|
||||
private final Registry<Biome> biomeRegistry;
|
||||
|
||||
public BOPBiomeProvider(long seed)
|
||||
{
|
||||
super(Stream.concat(VANILLA_POSSIBLE_BIOMES.stream(), BOPClimates.getOverworldBiomes().stream()).map(BiomeUtil::getBiome).collect(Collectors.toList()));
|
||||
this.seed = seed;
|
||||
this.noiseBiomeLayer = BOPLayerUtil.createGenLayers(seed, new BOPOverworldGenSettings());
|
||||
this.biomeRegistry = DynamicRegistries.builtin().registryOrThrow(Registry.BIOME_REGISTRY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,6 +62,6 @@ public class BOPBiomeProvider extends BiomeProvider
|
|||
@Override
|
||||
public Biome getNoiseBiome(int x, int y, int z)
|
||||
{
|
||||
return this.noiseBiomeLayer.get(WorldGenRegistries.BIOME, x, z);
|
||||
return this.noiseBiomeLayer.get(biomeRegistry, x, z);
|
||||
}
|
||||
}
|
|
@ -9,14 +9,15 @@ package biomesoplenty.common.world.gen.feature;
|
|||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.world.gen.feature.tree.*;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.*;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.LeavesBlock;
|
||||
import net.minecraft.block.SaplingBlock;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.world.gen.carver.ConfiguredCarver;
|
||||
import net.minecraft.world.gen.carver.ConfiguredCarvers;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.WorldGenRegistries;
|
||||
import net.minecraft.world.gen.carver.WorldCarver;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
@ -39,7 +40,7 @@ public class BOPBiomeFeatures
|
|||
public static final Feature<BaseTreeFeatureConfig> SILK_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.dead_log.defaultBlockState()).leaves(BOPBlocks.dead_leaves.defaultBlockState()).altLeaves(Blocks.COBWEB.defaultBlockState()).create();
|
||||
public static final Feature<BaseTreeFeatureConfig> FULL_SILK_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.dead_log.defaultBlockState()).leaves(Blocks.COBWEB.defaultBlockState()).create();
|
||||
public static final Feature<BaseTreeFeatureConfig> MAGIC_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.magic_log.defaultBlockState()).leaves(BOPBlocks.magic_leaves.defaultBlockState()).create();
|
||||
|
||||
|
||||
//Big Trees
|
||||
public static final Feature<BaseTreeFeatureConfig> BIG_OAK_TREE = new BigTreeFeature.Builder().create();
|
||||
public static final Feature<BaseTreeFeatureConfig> BIG_ORIGIN_TREE = new BigTreeFeature.Builder().leaves(BOPBlocks.origin_leaves.defaultBlockState()).create();
|
||||
|
@ -116,7 +117,7 @@ public class BOPBiomeFeatures
|
|||
public static final Feature<BaseTreeFeatureConfig> DEAD_TREE_WASTELAND = new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.dried_salt).trunkFruit(BOPBlocks.dead_branch.defaultBlockState()).leafChance(0.0F, 0.0F).leaves(Blocks.AIR.defaultBlockState()).log(BOPBlocks.dead_log.defaultBlockState()).minHeight(6).maxHeight(10).create();
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//Features
|
||||
public static final Feature<NoFeatureConfig> BRAMBLE = new BrambleFeature(NoFeatureConfig.CODEC);
|
||||
public static final Feature<NoFeatureConfig> MANGROVE = new MangroveFeature(NoFeatureConfig.CODEC);
|
||||
|
@ -164,36 +165,6 @@ public class BOPBiomeFeatures
|
|||
public static final FlowersFeature TROPICS_FLOWERS = new TropicsFlowersFeature();
|
||||
public static final FlowersFeature WASTELAND_FLOWERS = new WastelandFlowersFeature();
|
||||
public static final FlowersFeature WETLAND_FLOWERS = new WetlandFlowersFeature();
|
||||
|
||||
//Surfaces
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> BRUSHLAND_SURFACE_BUILDER = new BrushlandSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> CHAPARRAL_SURFACE_BUILDER = new ChaparralSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> COLD_DESERT_SURFACE_BUILDER = new ColdDesertSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> TERRACOTTA_SURFACE_BUILDER = new TerracottaSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> MARSH_SURFACE_BUILDER = new MarshSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> MANGROVE_SURFACE_BUILDER = new MangroveSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> MUD_SURFACE_BUILDER = new MudSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> PODZOL_SURFACE_BUILDER = new PodzolSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> VOLCANO_SURFACE_BUILDER = new VolcanoSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> DEEP_TOP_LAYER = new DeepTopLayerSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
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 SurfaceBuilder<SurfaceBuilderConfig> TROPICS_SURFACE_BUILDER = new TropicsSurfaceBuilder(SurfaceBuilderConfig.CODEC);
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> BLACK_SAND_SURFACE_BUILDER = new BlackSandSurfaceBuilder(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());
|
||||
public static final SurfaceBuilderConfig TERRACOTTA_SURFACE = new SurfaceBuilderConfig(Blocks.TERRACOTTA.defaultBlockState(), Blocks.TERRACOTTA.defaultBlockState(), Blocks.GRAVEL.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig MAGMA_SURFACE = new SurfaceBuilderConfig(Blocks.MAGMA_BLOCK.defaultBlockState(), Blocks.MAGMA_BLOCK.defaultBlockState(), Blocks.BASALT.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig MUD_SURFACE = new SurfaceBuilderConfig(BOPBlocks.mud.defaultBlockState(), BOPBlocks.mud.defaultBlockState(), BOPBlocks.mud.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig RED_SAND_SURFACE = new SurfaceBuilderConfig(Blocks.RED_SAND.defaultBlockState(), Blocks.RED_SAND.defaultBlockState(), Blocks.RED_SAND.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig SNOW_SNOW_GRAVEL_SURFACE = new SurfaceBuilderConfig(Blocks.SNOW_BLOCK.defaultBlockState(), Blocks.SNOW_BLOCK.defaultBlockState(), Blocks.GRAVEL.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig WHITE_SAND_SURFACE = new SurfaceBuilderConfig(BOPBlocks.white_sand.defaultBlockState(), BOPBlocks.white_sand.defaultBlockState(), BOPBlocks.white_sand.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig BLACK_SAND_SURFACE = new SurfaceBuilderConfig(BOPBlocks.black_sand.defaultBlockState(), BOPBlocks.black_sand.defaultBlockState(), BOPBlocks.black_sand.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig DRIED_SALT_SURFACE = new SurfaceBuilderConfig(BOPBlocks.dried_salt.defaultBlockState(), BOPBlocks.dried_salt.defaultBlockState(), BOPBlocks.dried_salt.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig ORIGIN_GRASS_SURFACE = new SurfaceBuilderConfig(BOPBlocks.origin_grass_block.defaultBlockState(), Blocks.DIRT.defaultBlockState(), Blocks.GRAVEL.defaultBlockState());
|
||||
|
||||
//Vanilla Biomes Features
|
||||
public static final FlowersFeature VIOLET_FEATURE = new VioletFeature();
|
||||
|
@ -206,4 +177,9 @@ public class BOPBiomeFeatures
|
|||
|
||||
//Other
|
||||
public static final LiquidsConfig VOLCANO_SPRING_CONFIG = new LiquidsConfig(Fluids.LAVA.defaultFluidState(), true, 4, 1, ImmutableSet.of(Blocks.BASALT, Blocks.MAGMA_BLOCK, BOPBlocks.black_sand, BOPBlocks.black_sandstone, Blocks.STONE, Blocks.GRANITE, Blocks.DIORITE, Blocks.ANDESITE));
|
||||
|
||||
private static <FC extends IFeatureConfig> ConfiguredFeature<FC, ?> register(String name, ConfiguredFeature<FC, ?> feature)
|
||||
{
|
||||
return Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, name, feature);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
******************************************************************************/
|
||||
package biomesoplenty.common.world.gen.feature;
|
||||
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
@ -28,7 +29,7 @@ public class ColdDesertSurfaceBuilder extends SurfaceBuilder<SurfaceBuilderConfi
|
|||
{
|
||||
if (noise > 2.6D)
|
||||
{
|
||||
SurfaceBuilder.DEFAULT.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPBiomeFeatures.SNOW_SNOW_GRAVEL_SURFACE);
|
||||
SurfaceBuilder.DEFAULT.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPSurfaceBuilders.SNOW_SNOW_GRAVEL_SURFACE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
******************************************************************************/
|
||||
package biomesoplenty.common.world.gen.feature;
|
||||
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
@ -27,7 +28,7 @@ public class MudSurfaceBuilder extends SurfaceBuilder<SurfaceBuilderConfig>
|
|||
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) {
|
||||
if (noise > 1.7D)
|
||||
{
|
||||
SurfaceBuilder.DEFAULT.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPBiomeFeatures.MUD_SURFACE);
|
||||
SurfaceBuilder.DEFAULT.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPSurfaceBuilders.MUD_SURFACE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2020, 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.world.gen.surfacebuilders;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.world.gen.feature.*;
|
||||
import biomesoplenty.core.BiomesOPlenty;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.gen.surfacebuilders.ISurfaceBuilderConfig;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig;
|
||||
|
||||
public class BOPSurfaceBuilders
|
||||
{
|
||||
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());
|
||||
public static final SurfaceBuilderConfig TERRACOTTA_SURFACE = new SurfaceBuilderConfig(Blocks.TERRACOTTA.defaultBlockState(), Blocks.TERRACOTTA.defaultBlockState(), Blocks.GRAVEL.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig MAGMA_SURFACE = new SurfaceBuilderConfig(Blocks.MAGMA_BLOCK.defaultBlockState(), Blocks.MAGMA_BLOCK.defaultBlockState(), Blocks.BASALT.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig MUD_SURFACE = new SurfaceBuilderConfig(BOPBlocks.mud.defaultBlockState(), BOPBlocks.mud.defaultBlockState(), BOPBlocks.mud.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig RED_SAND_SURFACE = new SurfaceBuilderConfig(Blocks.RED_SAND.defaultBlockState(), Blocks.RED_SAND.defaultBlockState(), Blocks.RED_SAND.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig SNOW_SNOW_GRAVEL_SURFACE = new SurfaceBuilderConfig(Blocks.SNOW_BLOCK.defaultBlockState(), Blocks.SNOW_BLOCK.defaultBlockState(), Blocks.GRAVEL.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig WHITE_SAND_SURFACE = new SurfaceBuilderConfig(BOPBlocks.white_sand.defaultBlockState(), BOPBlocks.white_sand.defaultBlockState(), BOPBlocks.white_sand.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig BLACK_SAND_SURFACE = new SurfaceBuilderConfig(BOPBlocks.black_sand.defaultBlockState(), BOPBlocks.black_sand.defaultBlockState(), BOPBlocks.black_sand.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig DRIED_SALT_SURFACE = new SurfaceBuilderConfig(BOPBlocks.dried_salt.defaultBlockState(), BOPBlocks.dried_salt.defaultBlockState(), BOPBlocks.dried_salt.defaultBlockState());
|
||||
public static final SurfaceBuilderConfig ORIGIN_GRASS_SURFACE = new SurfaceBuilderConfig(BOPBlocks.origin_grass_block.defaultBlockState(), Blocks.DIRT.defaultBlockState(), Blocks.GRAVEL.defaultBlockState());
|
||||
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> BRUSHLAND = register("brushland", new BrushlandSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> CHAPARRAL = register("chaparral", new ChaparralSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> COLD_DESERT = register("cold_desert", new ColdDesertSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> TERRACOTTA = register("terracotta", new TerracottaSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> MARSH = register("marsh", new MarshSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> MANGROVE = register("mangrove", new MangroveSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> MUD = register("mud", new MudSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> PODZOL = register("podzol", new PodzolSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> VOLCANO = register("volcano", new VolcanoSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> DEEP_TOP_LAYER = register("deep_top_layer", new DeepTopLayerSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> POPPY_FIELD = register("poppy_field", new PoppyFieldSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> WITHERED_ABYSS = register("withered_abyss", new WitheredAbyssSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> FLESH = register("flesh", new FleshSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> ORIGIN_HILLS = register("origin_hills", new OriginHillsSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> TROPICS = register("tropics", new TropicsSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
public static final SurfaceBuilder<SurfaceBuilderConfig> BLACK_SAND = register("black_sand", new BlackSandSurfaceBuilder(SurfaceBuilderConfig.CODEC));
|
||||
|
||||
private static <C extends ISurfaceBuilderConfig, F extends SurfaceBuilder<C>> F register(String key, F builder)
|
||||
{
|
||||
return Registry.register(Registry.SURFACE_BUILDER, new ResourceLocation(BiomesOPlenty.MOD_ID, key), builder);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import com.mojang.serialization.Codec;
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
|
@ -1,4 +1,4 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
|
@ -1,4 +1,4 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -26,7 +26,7 @@ public class TerracottaSurfaceBuilder extends SurfaceBuilder<SurfaceBuilderConfi
|
|||
@Override
|
||||
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) {
|
||||
if (noise > 1.9D) {
|
||||
SurfaceBuilder.DEFAULT.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPBiomeFeatures.TERRACOTTA_SURFACE);
|
||||
SurfaceBuilder.DEFAULT.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPSurfaceBuilders.TERRACOTTA_SURFACE);
|
||||
} else {
|
||||
SurfaceBuilder.DEFAULT.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, SurfaceBuilder.CONFIG_GRASS);
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import com.mojang.serialization.Codec;
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -28,11 +28,11 @@ public class VolcanoSurfaceBuilder extends SurfaceBuilder<SurfaceBuilderConfig>
|
|||
{
|
||||
if (noise > 2.7F)
|
||||
{
|
||||
SurfaceBuilder.DEFAULT.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPBiomeFeatures.MAGMA_SURFACE);
|
||||
SurfaceBuilder.DEFAULT.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPSurfaceBuilders.MAGMA_SURFACE);
|
||||
}
|
||||
else
|
||||
{
|
||||
BOPBiomeFeatures.DEEP_TOP_LAYER.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPBiomeFeatures.BASALT_SURFACE);
|
||||
BOPSurfaceBuilders.DEEP_TOP_LAYER.apply(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, BOPSurfaceBuilders.BASALT_SURFACE);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.world.gen.feature;
|
||||
package biomesoplenty.common.world.gen.surfacebuilders;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.serialization.Codec;
|
|
@ -11,6 +11,8 @@ package biomesoplenty.core;
|
|||
import biomesoplenty.common.world.BOPWorldTypeUtil;
|
||||
import biomesoplenty.init.*;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
import net.minecraft.util.registry.DynamicRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
@ -20,6 +22,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent;
|
|||
import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent;
|
||||
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -59,6 +62,8 @@ public class BiomesOPlenty
|
|||
private void loadComplete(final FMLLoadCompleteEvent event) // PostRegistrationEven
|
||||
{
|
||||
proxy.init();
|
||||
ForgeRegistries.BIOMES.getKeys().forEach(key -> BiomesOPlenty.logger.info("Forge: " + key));
|
||||
DynamicRegistries.builtin().registryOrThrow(Registry.BIOME_REGISTRY).keySet().stream().forEach(key -> BiomesOPlenty.logger.info("Vanilla: " + key));
|
||||
}
|
||||
|
||||
private void serverStarting(final FMLServerAboutToStartEvent event)
|
||||
|
|
|
@ -282,12 +282,9 @@ public class ModBiomes
|
|||
|
||||
private static void registerVillagerType(RegistryKey<Biome> key, VillagerType type)
|
||||
{
|
||||
Biome biome = BiomeUtil.getBiome(key);
|
||||
|
||||
if (biome != null)
|
||||
if (BiomeUtil.exists(key))
|
||||
{
|
||||
// TODO
|
||||
//VillagerType.BY_BIOME.put(biome, type);
|
||||
VillagerType.BY_BIOME.put(key, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ public-f net.minecraft.client.gui.screen.BiomeGeneratorTypeScreens *
|
|||
public net.minecraft.client.gui.screen.BiomeGeneratorTypeScreens <init>(Ljava/lang/String;)V
|
||||
public net.minecraft.block.Blocks *()
|
||||
public net.minecraft.client.Minecraft$PackManager *()
|
||||
public-f net.minecraft.entity.villager.VillagerType field_221180_h
|
||||
|
||||
# Set worldtype as default and skip the confirm backup screen
|
||||
public-f net.minecraft.client.gui.screen.ConfirmBackupScreen *
|
||||
|
|
Loading…
Reference in a new issue