From 16d0e0f7a75e3d0c67454462bbd13a4a0f51b442 Mon Sep 17 00:00:00 2001 From: Forstride Date: Tue, 18 Feb 2020 07:21:12 -0500 Subject: [PATCH] Removed Glowstone Grotto nether biome (NOTE: CONFIGS NEED TO BE DELETED OR YOUR GAME WILL CRASH ON LOAD!) --- .../biomesoplenty/api/biome/BOPBiomes.java | 1 - .../biome/nether/GlowstoneGrottoBiome.java | 54 -------------- .../biome/nether/VisceralHeapBiome.java | 2 +- .../world/gen/feature/BOPBiomeFeatures.java | 1 - .../world/gen/feature/BoneSpineFeature.java | 27 +------ .../gen/feature/GlowstoneSpikesFeature.java | 73 ------------------- .../java/biomesoplenty/init/ModBiomes.java | 2 - .../assets/biomesoplenty/lang/en_us.json | 1 - .../biomesoplenty/all_biomes.json | 42 +++++------ .../advancements/biomesoplenty/root.json | 51 ++++++------- 10 files changed, 44 insertions(+), 210 deletions(-) delete mode 100644 src/main/java/biomesoplenty/common/biome/nether/GlowstoneGrottoBiome.java delete mode 100644 src/main/java/biomesoplenty/common/world/gen/feature/GlowstoneSpikesFeature.java diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java index eceec203d..174c5b454 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java @@ -81,7 +81,6 @@ public class BOPBiomes public static Optional xeric_shrubland = Optional.empty(); public static Optional ashen_inferno = Optional.empty(); - public static Optional glowstone_grotto = Optional.empty(); public static Optional undergarden = Optional.empty(); public static Optional visceral_heap = Optional.empty(); } diff --git a/src/main/java/biomesoplenty/common/biome/nether/GlowstoneGrottoBiome.java b/src/main/java/biomesoplenty/common/biome/nether/GlowstoneGrottoBiome.java deleted file mode 100644 index 9e9166b9d..000000000 --- a/src/main/java/biomesoplenty/common/biome/nether/GlowstoneGrottoBiome.java +++ /dev/null @@ -1,54 +0,0 @@ -package biomesoplenty.common.biome.nether; - -import biomesoplenty.api.enums.BOPClimates; -import biomesoplenty.common.biome.NetherBiomeBOP; -import biomesoplenty.common.world.biome.BiomeFeatureHelper; -import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures; -import net.minecraft.block.Blocks; -import net.minecraft.entity.EntityClassification; -import net.minecraft.entity.EntityType; -import net.minecraft.fluid.Fluids; -import net.minecraft.world.biome.DefaultBiomeFeatures; -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.*; -import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder; - -public class GlowstoneGrottoBiome extends NetherBiomeBOP -{ - public GlowstoneGrottoBiome() - { - super((new Builder()).surfaceBuilder(SurfaceBuilder.NETHER, SurfaceBuilder.CONFIG_HELL).precipitation(RainType.NONE).biomeCategory(Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F).waterColor(4159204).waterFogColor(329011).parent((String)null)); - - //Terrain - this.addStructureStart(Feature.NETHER_BRIDGE.configured(IFeatureConfig.NONE)); - this.addCarver(GenerationStage.Carving.AIR, makeCarver(WorldCarver.HELL_CAVE, new ProbabilityConfig(0.2F))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Feature.SPRING.configured(DefaultBiomeFeatures.LAVA_SPRING_CONFIG).decorated(Placement.COUNT_VERY_BIASED_RANGE.configured(new CountRangeConfig(20, 8, 16, 256)))); - - DefaultBiomeFeatures.addDefaultMushrooms(this); - - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.NETHER_BRIDGE.configured(IFeatureConfig.NONE).decorated(Placement.NOPE.configured(IPlacementConfig.NONE))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.SPRING.configured(DefaultBiomeFeatures.OPEN_NETHER_SPRING_CONFIG).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(8, 4, 8, 128)))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(DefaultBiomeFeatures.HELL_FIRE_CONFIG).decorated(Placement.HELL_FIRE.configured(new FrequencyConfig(10)))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.GLOWSTONE_BLOB.configured(IFeatureConfig.NONE).decorated(Placement.LIGHT_GEM_CHANCE.configured(new FrequencyConfig(50)))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.GLOWSTONE_BLOB.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(50, 0, 0, 128)))); - - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.GLOWSTONE_SPIKES.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(10)))); - - //Base Decorations - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.BROWN_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_RANGE.configured(new ChanceRangeConfig(0.25F, 0, 0, 128)))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.RED_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_RANGE.configured(new ChanceRangeConfig(0.25F, 0, 0, 128)))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Blocks.NETHER_QUARTZ_ORE.defaultBlockState(), 14)).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(16, 10, 20, 128)))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.ORE.configured(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Blocks.MAGMA_BLOCK.defaultBlockState(), 33)).decorated(Placement.MAGMA.configured(new FrequencyConfig(4)))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.SPRING.configured(DefaultBiomeFeatures.CLOSED_NETHER_SPRING_CONFIG).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(16, 10, 20, 128)))); - - //Entities - this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.GHAST, 20, 4, 4)); - this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE_PIGMAN, 50, 4, 4)); - this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.MAGMA_CUBE, 2, 4, 4)); - this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 1, 4, 4)); - - this.addWeight(BOPClimates.NETHER, 3); - } -} diff --git a/src/main/java/biomesoplenty/common/biome/nether/VisceralHeapBiome.java b/src/main/java/biomesoplenty/common/biome/nether/VisceralHeapBiome.java index 933d64d83..bda912bf9 100644 --- a/src/main/java/biomesoplenty/common/biome/nether/VisceralHeapBiome.java +++ b/src/main/java/biomesoplenty/common/biome/nether/VisceralHeapBiome.java @@ -35,7 +35,7 @@ public class VisceralHeapBiome extends NetherBiomeBOP this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.GLOWSTONE_BLOB.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_RANGE.configured(new CountRangeConfig(7, 0, 0, 128)))); this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.FLESH_SPLATTER.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(500)))); - this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.BONE_SPINE.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(15)))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPBiomeFeatures.BONE_SPINE.configured(IFeatureConfig.NONE).decorated(Placement.COUNT_HEIGHTMAP_DOUBLE.configured(new FrequencyConfig(10)))); //Base Decorations this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(Blocks.BROWN_MUSHROOM.defaultBlockState())).decorated(Placement.CHANCE_RANGE.configured(new ChanceRangeConfig(0.1F, 0, 0, 128)))); diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java index aef692bea..d4c195bca 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java @@ -126,7 +126,6 @@ public class BOPBiomeFeatures public static final Feature FLESH_SPLATTER = new FleshSplatterFeature(NoFeatureConfig::deserialize); public static final Feature BONE_SPINE = new BoneSpineFeature(NoFeatureConfig::deserialize); public static final Feature ASH_SPLATTER = new AshSplatterFeature(NoFeatureConfig::deserialize); - public static final Feature GLOWSTONE_SPIKES = new GlowstoneSpikesFeature(NoFeatureConfig::deserialize); public static final Feature PODZOL_SPLATTER = new PodzolSplatterFeature(NoFeatureConfig::deserialize); public static final Feature MYCELIUM_SPLATTER = new MyceliumSplatterFeature(NoFeatureConfig::deserialize); public static final Feature SMALL_RED_MUSHROOM = new SmallRedMushroomFeature(NoFeatureConfig::deserialize); diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/BoneSpineFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/BoneSpineFeature.java index 0ec8118c1..da7c7996f 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/BoneSpineFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BoneSpineFeature.java @@ -21,7 +21,7 @@ public class BoneSpineFeature extends Feature { protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.flesh; protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).isAir(world, pos); - private int maxHeight = 8; + private int maxHeight = 5; public BoneSpineFeature(Function, ? extends NoFeatureConfig> deserializer) { @@ -47,32 +47,11 @@ public class BoneSpineFeature extends Feature BlockPos pos = startPos.above(); - int height = 2 + p_212245_3_.nextInt(2); + int height = 1 + p_212245_3_.nextInt(maxHeight - 1); - boolean spine = false; - if (p_212245_3_.nextInt(3) == 0) - { - spine = true; - height = 2 + p_212245_3_.nextInt(maxHeight + 1); - } - - for (int y = 0; y < height; y++) + for (int y = 0; y <= height; y++) { this.setBlock(world, pos.offset(0, y, 0), Blocks.BONE_BLOCK.defaultBlockState()); - - if (spine == true && y % 2 == 1) - { - this.setBlock(world, pos.offset(1, y, 0), Blocks.BONE_BLOCK.defaultBlockState().setValue(RotatedPillarBlock.AXIS, Direction.Axis.X)); - this.setBlock(world, pos.offset(-1, y, 0), Blocks.BONE_BLOCK.defaultBlockState().setValue(RotatedPillarBlock.AXIS, Direction.Axis.X)); - this.setBlock(world, pos.offset(0, y, 1), Blocks.BONE_BLOCK.defaultBlockState().setValue(RotatedPillarBlock.AXIS, Direction.Axis.Z)); - this.setBlock(world, pos.offset(0, y, -1), Blocks.BONE_BLOCK.defaultBlockState().setValue(RotatedPillarBlock.AXIS, Direction.Axis.Z)); - } - } - - this.setBlock(world, pos.offset(0, height, 0), Blocks.BONE_BLOCK.defaultBlockState()); - if (height % 2 == 0) - { - this.setBlock(world, pos.offset(0, height + 1, 0), Blocks.BONE_BLOCK.defaultBlockState()); } return true; diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/GlowstoneSpikesFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/GlowstoneSpikesFeature.java deleted file mode 100644 index f421979c7..000000000 --- a/src/main/java/biomesoplenty/common/world/gen/feature/GlowstoneSpikesFeature.java +++ /dev/null @@ -1,73 +0,0 @@ -package biomesoplenty.common.world.gen.feature; - -import biomesoplenty.common.util.block.IBlockPosQuery; -import com.mojang.datafixers.Dynamic; -import net.minecraft.block.Blocks; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.IWorld; -import net.minecraft.world.gen.ChunkGenerator; -import net.minecraft.world.gen.GenerationSettings; -import net.minecraft.world.gen.feature.Feature; -import net.minecraft.world.gen.feature.NoFeatureConfig; - -import java.util.Random; -import java.util.function.Function; - -public class GlowstoneSpikesFeature extends Feature -{ - protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.NETHERRACK; - protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).isAir(world, pos); - int minRadius = 2; - int maxRadius = 3; - int minHeight = 4; - int maxHeight = 11; - - public GlowstoneSpikesFeature(Function, ? extends NoFeatureConfig> deserializer) - { - super(deserializer); - } - - @Override - public boolean place(IWorld world, ChunkGenerator p_212245_2_, Random rand, BlockPos startPos, NoFeatureConfig p_212245_5_) - { - int randRadius = this.minRadius + rand.nextInt(this.maxRadius - this.minRadius); - int height = this.minHeight + rand.nextInt(this.maxHeight - this.minHeight); - - while (startPos.getY() > 1 && this.replace.matches(world, startPos)) {startPos = startPos.below();} - - for (int x = 0; x <= randRadius - 1; x++) - { - for (int z = 0; z <= randRadius - 1; z++) - { - if (!this.placeOn.matches(world, startPos.offset(x, 0, z))) - { - return false; - } - } - } - - BlockPos pos = startPos.above(); - - // Generate - for (int y = 0; y < height - 1; y++) - { - int radius = (randRadius * (height - y) / height) + 1; - int radiusStart = MathHelper.ceil(0.25D - radius / 2.0D); - int radiusEnd = MathHelper.floor(0.25D + radius / 2.0D); - - for (int x = radiusStart; x <= radiusEnd; x++) - { - for (int z = radiusStart; z <= radiusEnd; z++) - { - if (this.replace.matches(world, pos.offset(x, y, z))) - { - world.setBlock(pos.offset(x, y, z), Blocks.GLOWSTONE.defaultBlockState(), 2); - } - } - } - } - - return true; - } -} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/init/ModBiomes.java b/src/main/java/biomesoplenty/init/ModBiomes.java index da8857404..bbc1a33bf 100644 --- a/src/main/java/biomesoplenty/init/ModBiomes.java +++ b/src/main/java/biomesoplenty/init/ModBiomes.java @@ -118,7 +118,6 @@ public class ModBiomes //Nether Biomes registerBiome(new AshenInfernoBiome(), "ashen_inferno"); - registerBiome(new GlowstoneGrottoBiome(), "glowstone_grotto"); registerBiome(new UndergardenBiome(), "undergarden"); registerBiome(new VisceralHeapBiome(), "visceral_heap"); @@ -255,7 +254,6 @@ public class ModBiomes //Nether Biomes registerBiomeToDictionary(ashen_inferno, Type.NETHER, Type.HOT); - registerBiomeToDictionary(glowstone_grotto, Type.NETHER, Type.HOT); registerBiomeToDictionary(undergarden, Type.NETHER, Type.HOT); registerBiomeToDictionary(visceral_heap, Type.NETHER, Type.HOT); } diff --git a/src/main/resources/assets/biomesoplenty/lang/en_us.json b/src/main/resources/assets/biomesoplenty/lang/en_us.json index 0c2edc963..d1ffc8a5e 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_us.json +++ b/src/main/resources/assets/biomesoplenty/lang/en_us.json @@ -24,7 +24,6 @@ "biome.biomesoplenty.flower_meadow": "Flower Meadow", "biome.biomesoplenty.fungal_jungle": "Fungal Jungle", "biome.biomesoplenty.ghost_forest": "Ghost Forest", - "biome.biomesoplenty.glowstone_grotto": "Glowstone Grotto", "biome.biomesoplenty.grassland": "Grassland", "biome.biomesoplenty.gravel_beach": "Gravel Beach", "biome.biomesoplenty.grove": "Grove", diff --git a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json index d08aaddc7..54dc71fd5 100644 --- a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json +++ b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json @@ -26,6 +26,12 @@ "conditions": { "biome": "biomesoplenty:alps_foothills" } + }, + "ashen_inferno": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:ashen_inferno" + } }, "bayou": { "trigger": "minecraft:location", @@ -368,6 +374,18 @@ "conditions": { "biome": "biomesoplenty:tundra" } + }, + "undergarden": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:undergarden" + } + }, + "visceral_heap": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:visceral_heap" + } }, "volcano": { "trigger": "minecraft:location", @@ -410,30 +428,6 @@ "conditions": { "biome": "biomesoplenty:xeric_shrubland" } - }, - "ashen_inferno": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:ashen_inferno" - } - }, - "glowstone_grotto": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:glowstone_grotto" - } - }, - "undergarden": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:undergarden" - } - }, - "visceral_heap": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:visceral_heap" - } } }, "rewards": { diff --git a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json index 74a37d4d8..8c93ccea6 100644 --- a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json +++ b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json @@ -25,6 +25,12 @@ "conditions": { "biome": "biomesoplenty:alps_foothills" } + }, + "ashen_inferno": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:ashen_inferno" + } }, "bayou": { "trigger": "minecraft:location", @@ -367,6 +373,18 @@ "conditions": { "biome": "biomesoplenty:tundra" } + }, + "undergarden": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:undergarden" + } + }, + "visceral_heap": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:visceral_heap" + } }, "volcano": { "trigger": "minecraft:location", @@ -409,36 +427,13 @@ "conditions": { "biome": "biomesoplenty:xeric_shrubland" } - }, - "ashen_inferno": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:ashen_inferno" - } - }, - "glowstone_grotto": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:glowstone_grotto" - } - }, - "undergarden": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:undergarden" - } - }, - "visceral_heap": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:visceral_heap" - } } }, "requirements": [ [ "alps", "alps_foothills", + "ashen_inferno", "bayou", "bog", "boreal_forest", @@ -496,17 +491,15 @@ "tropical_rainforest", "tropics", "tundra", + "undergarden", + "visceral_heap", "volcano", "volcano_edge", "wasteland", "wetland", "white_beach", "woodland", - "xeric_shrubland", - "ashen_inferno", - "glowstone_grotto", - "undergarden", - "visceral_heap" + "xeric_shrubland" ] ] } \ No newline at end of file