From 97965c1abccd907b964703c6292a7bb112f396c4 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Fri, 24 May 2013 11:45:47 -0400 Subject: [PATCH] Added beach variation placeholders. --- src/minecraft/biomesoplenty/api/Biomes.java | 4 ++++ .../biomes/BiomeGenBeachGravel.java | 23 +++++++++++++++++++ .../biomes/BiomeGenBeachOvergrown.java | 23 +++++++++++++++++++ .../biomesoplenty/blocks/BlockBOPFoliage.java | 9 ++++++++ .../configuration/BOPBiomes.java | 12 ++++++++-- .../configuration/BOPConfiguration.java | 7 ++++++ .../integration/ForestryIntegration.java | 4 ++++ 7 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 src/minecraft/biomesoplenty/biomes/BiomeGenBeachGravel.java create mode 100644 src/minecraft/biomesoplenty/biomes/BiomeGenBeachOvergrown.java diff --git a/src/minecraft/biomesoplenty/api/Biomes.java b/src/minecraft/biomesoplenty/api/Biomes.java index 8cfb69463..b6f4d1171 100644 --- a/src/minecraft/biomesoplenty/api/Biomes.java +++ b/src/minecraft/biomesoplenty/api/Biomes.java @@ -11,6 +11,10 @@ public class Biomes public static Optional badlands = Optional.absent(); public static Optional bambooForest = Optional.absent(); public static Optional bayou = Optional.absent(); + + public static Optional beachGravel = Optional.absent(); + public static Optional beachOvergrown = Optional.absent(); + public static Optional birchForest = Optional.absent(); public static Optional bog = Optional.absent(); public static Optional borealForest = Optional.absent(); diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenBeachGravel.java b/src/minecraft/biomesoplenty/biomes/BiomeGenBeachGravel.java new file mode 100644 index 000000000..5bd4d73a7 --- /dev/null +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenBeachGravel.java @@ -0,0 +1,23 @@ +package biomesoplenty.biomes; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class BiomeGenBeachGravel extends BiomeGenBase +{ + public BiomeGenBeachGravel(int par1) + { + super(par1); + this.spawnableCreatureList.clear(); + this.topBlock = (byte)Block.gravel.blockID; + this.fillerBlock = (byte)Block.gravel.blockID; + this.theBiomeDecorator.treesPerChunk = -999; + this.theBiomeDecorator.deadBushPerChunk = -999; + this.theBiomeDecorator.reedsPerChunk = -999; + this.theBiomeDecorator.cactiPerChunk = -999; + } +} diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenBeachOvergrown.java b/src/minecraft/biomesoplenty/biomes/BiomeGenBeachOvergrown.java new file mode 100644 index 000000000..79a266466 --- /dev/null +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenBeachOvergrown.java @@ -0,0 +1,23 @@ +package biomesoplenty.biomes; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.world.World; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class BiomeGenBeachOvergrown extends BiomeGenBase +{ + public BiomeGenBeachOvergrown(int par1) + { + super(par1); + this.spawnableCreatureList.clear(); + this.topBlock = (byte)Block.sand.blockID; + this.fillerBlock = (byte)Block.sand.blockID; + this.theBiomeDecorator.treesPerChunk = 5; + this.theBiomeDecorator.deadBushPerChunk = -999; + this.theBiomeDecorator.reedsPerChunk = -999; + this.theBiomeDecorator.cactiPerChunk = 1; + } +} diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java index 72dae4159..5a5d0ed4b 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPFoliage.java @@ -220,6 +220,15 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable return -1; } + public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int par7) + { + if (world.isRemote) + return; + + if (meta == 8) + this.dropBlockAsItem_do(world, x, y, z, new ItemStack(Items.berries.get(), 1, 0)); + } + @Override public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) { diff --git a/src/minecraft/biomesoplenty/configuration/BOPBiomes.java b/src/minecraft/biomesoplenty/configuration/BOPBiomes.java index bd8221d74..7c688bffd 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPBiomes.java +++ b/src/minecraft/biomesoplenty/configuration/BOPBiomes.java @@ -68,7 +68,11 @@ public class BOPBiomes { Biomes.badlands = Optional.of((new BiomeGenBadlands(BOPConfiguration.badlandsID)).setColor(16421912).setBiomeName("Badlands").setTemperatureRainfall(2.0F, 0.0F).setMinMaxHeight(0.3F, 0.9F)); Biomes.bambooForest = Optional.of((new BiomeGenBambooForest(BOPConfiguration.bambooForestID)).setColor(112).setBiomeName("Bamboo Forest").setMinMaxHeight(0.0F, 0.3F).setTemperatureRainfall(1.2F, 0.9F)); Biomes.bayou = Optional.of((new BiomeGenBayou(BOPConfiguration.bayouID)).setColor(522674).setBiomeName("Bayou").func_76733_a(9154376).setMinMaxHeight(-0.3F, 0.2F).setTemperatureRainfall(0.5F, 0.9F)); - Biomes.birchForest = Optional.of((new BiomeGenBirchForest(BOPConfiguration.birchForestID)).setColor(353825).setBiomeName("Birch Forest").func_76733_a(5159473).setTemperatureRainfall(0.4F, 0.3F)); + + Biomes.beachGravel = Optional.of((new BiomeGenBeachGravel(BOPConfiguration.beachGravelID)).setColor(16440917).setBiomeName("Gravel Beach").setTemperatureRainfall(0.8F, 0.4F).setMinMaxHeight(0.0F, 0.1F)); + Biomes.beachOvergrown = Optional.of((new BiomeGenBeachOvergrown(BOPConfiguration.beachOvergrownID)).setColor(16440917).setBiomeName("Overgrown Beach").setTemperatureRainfall(0.8F, 0.4F).setMinMaxHeight(0.0F, 0.1F)); + + Biomes.birchForest = Optional.of((new BiomeGenBirchForest(BOPConfiguration.birchForestID)).setColor(353825).setBiomeName("Birch Forest").func_76733_a(5159473).setTemperatureRainfall(0.4F, 0.3F)); Biomes.bog = Optional.of((new BiomeGenBog(BOPConfiguration.bogID)).setColor(522674).setBiomeName("Bog").func_76733_a(9154376).setMinMaxHeight(-0.3F, -0.1F).setTemperatureRainfall(0.8F, 0.9F)); Biomes.borealForest = Optional.of((new BiomeGenBorealForest(BOPConfiguration.borealForestID)).setColor(353825).setBiomeName("Boreal Forest").func_76733_a(5159473).setMinMaxHeight(0.0F, 1.0F).setTemperatureRainfall(0.6F, 0.7F)); Biomes.brushland = Optional.of((new BiomeGenBrushland(BOPConfiguration.brushlandID)).setColor(16421912).setBiomeName("Brushland").setTemperatureRainfall(2.0F, 0.0F).setMinMaxHeight(0.0F, 0.5F)); @@ -129,7 +133,7 @@ public class BOPBiomes { Biomes.quagmire = Optional.of((new BiomeGenQuagmire(BOPConfiguration.quagmireID)).setColor(522674).setBiomeName("Quagmire").func_76733_a(9154376).setMinMaxHeight(-0.1F, 0.3F).setTemperatureRainfall(0.8F, 0.9F)); Biomes.rainforest = Optional.of((new BiomeGenRainforest(BOPConfiguration.rainforestID)).setColor(5470985).setBiomeName("Rainforest").func_76733_a(5470985).setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.7F, 1.8F)); Biomes.redwoodForest = Optional.of((new BiomeGenRedwoodForest(BOPConfiguration.redwoodForestID)).setColor(747097).setBiomeName("Redwood Forest").func_76733_a(5159473).setTemperatureRainfall(0.8F, 0.4F).setMinMaxHeight(0.0F, 0.4F)); - Biomes.sacredSprings = Optional.of((new BiomeGenSacredSprings(BOPConfiguration.sacredSpringsID)).setColor(522674).setBiomeName("Sacred Springs").func_76733_a(9154376).setMinMaxHeight(0.0F, 1.2F).setTemperatureRainfall(1.2F, 0.9F)); + Biomes.sacredSprings = Optional.of((new BiomeGenSacredSprings(BOPConfiguration.sacredSpringsID)).setColor(522674).setBiomeName("Sacred Springs").func_76733_a(9154376).setMinMaxHeight(0.4F, 1.2F).setTemperatureRainfall(1.2F, 0.9F)); Biomes.savanna = Optional.of((new BiomeGenSavanna(BOPConfiguration.savannaID)).setColor(9286496).setBiomeName("Savanna").setTemperatureRainfall(1.5F, 0.1F).setMinMaxHeight(0.1F, 0.1F)); Biomes.scrubland = Optional.of((new BiomeGenScrubland(BOPConfiguration.scrublandID)).setColor(9286496).setBiomeName("Scrubland").setTemperatureRainfall(1.2F, 0.0F).setMinMaxHeight(0.1F, 0.3F)); Biomes.seasonalForest = Optional.of((new BiomeGenSeasonalForest(BOPConfiguration.seasonalForestID)).setColor(353825).setBiomeName("Seasonal Forest").func_76733_a(5159473).setTemperatureRainfall(0.7F, 0.8F).setMinMaxHeight(0.2F, 0.7F)); @@ -165,6 +169,10 @@ public class BOPBiomes { BiomeDictionary.registerBiomeType(Biomes.badlands.get(), Type.DESERT, Type.WASTELAND); BiomeDictionary.registerBiomeType(Biomes.bambooForest.get(), Type.JUNGLE); BiomeDictionary.registerBiomeType(Biomes.bayou.get(), Type.SWAMP); + + BiomeDictionary.registerBiomeType(Biomes.beachGravel.get(), Type.BEACH); + BiomeDictionary.registerBiomeType(Biomes.beachOvergrown.get(), Type.BEACH, Type.FOREST); + BiomeDictionary.registerBiomeType(Biomes.birchForest.get(), Type.FOREST); BiomeDictionary.registerBiomeType(Biomes.bog.get(), Type.SWAMP); BiomeDictionary.registerBiomeType(Biomes.borealForest.get(), Type.FOREST); diff --git a/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java b/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java index e401bb404..1a65196b7 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java +++ b/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java @@ -232,6 +232,10 @@ public class BOPConfiguration { public static int badlandsID; public static int bambooForestID; public static int bayouID; + + public static int beachGravelID; + public static int beachOvergrownID; + public static int birchForestID; public static int bogID; public static int borealForestID; @@ -741,6 +745,9 @@ public class BOPConfiguration { //23-79 ExtraBiomesXL + beachGravelID = config.get("Biome IDs", "Gravel Beach ID", 60).getInt(); + beachOvergrownID = config.get("Biome IDs", "Overgrown Beach ID", 61).getInt(); + promisedLandForestID = config.get("Biome IDs", "Wonderous Woods (Promised Land) ID", 62).getInt(); promisedLandPlainsID = config.get("Biome IDs", "Majestic Meadow (Promised Land) ID", 63).getInt(); promisedLandSwampID = config.get("Biome IDs", "Blessed Bog (Promised Land) ID", 64).getInt(); diff --git a/src/minecraft/biomesoplenty/integration/ForestryIntegration.java b/src/minecraft/biomesoplenty/integration/ForestryIntegration.java index a476f0bde..8acb681a5 100644 --- a/src/minecraft/biomesoplenty/integration/ForestryIntegration.java +++ b/src/minecraft/biomesoplenty/integration/ForestryIntegration.java @@ -36,6 +36,8 @@ public class ForestryIntegration //Hot - Arid //Desert Hives EnumTemperature.hotBiomeIds.add(BOPConfiguration.badlandsID); + EnumTemperature.hotBiomeIds.add(BOPConfiguration.beachGravelID); + EnumTemperature.hotBiomeIds.add(BOPConfiguration.beachOvergrownID); EnumTemperature.hotBiomeIds.add(BOPConfiguration.brushlandID); EnumTemperature.hotBiomeIds.add(BOPConfiguration.deadlandsID); EnumTemperature.hotBiomeIds.add(BOPConfiguration.dunesID); @@ -159,6 +161,8 @@ public class ForestryIntegration EnumTemperature.normalBiomeIds.add(BOPConfiguration.extremeHillsNewID); EnumTemperature.normalBiomeIds.add(BOPConfiguration.forestNewID); + EnumHumidity.normalBiomeIds.add(BOPConfiguration.beachGravelID); + EnumHumidity.normalBiomeIds.add(BOPConfiguration.beachOvergrownID); EnumHumidity.normalBiomeIds.add(BOPConfiguration.birchForestID); EnumHumidity.normalBiomeIds.add(BOPConfiguration.borealForestID); EnumHumidity.normalBiomeIds.add(BOPConfiguration.canyonID);