From d04322375edfc8c741887b8f44c04fe08f62c425 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Sun, 15 Sep 2013 14:20:14 -0400 Subject: [PATCH] Finished village material stuff --- .../configuration/BOPBiomes.java | 52 +- .../BOPConfigurationTerrainGen.java | 125 ---- .../handlers/VillageMaterialEventHandler.java | 676 ++++++++++++++++++ .../biomesoplenty/worldgen/WorldGenMesa.java | 2 +- 4 files changed, 679 insertions(+), 176 deletions(-) diff --git a/common/biomesoplenty/configuration/BOPBiomes.java b/common/biomesoplenty/configuration/BOPBiomes.java index fb667a336..1968e2e75 100644 --- a/common/biomesoplenty/configuration/BOPBiomes.java +++ b/common/biomesoplenty/configuration/BOPBiomes.java @@ -521,79 +521,31 @@ public class BOPBiomes { private static void addVillageBiomes() { - addVillageBiome(Biomes.alps, BOPConfigurationTerrainGen.alpsVillage); addVillageBiome(Biomes.arctic, BOPConfigurationTerrainGen.arcticVillage); - addVillageBiome(Biomes.autumnHills, BOPConfigurationTerrainGen.autumnHillsVillage); - addVillageBiome(Biomes.badlands, BOPConfigurationTerrainGen.badlandsVillage); - addVillageBiome(Biomes.bambooForest, BOPConfigurationTerrainGen.bambooForestVillage); - addVillageBiome(Biomes.bayou, BOPConfigurationTerrainGen.bayouVillage); - addVillageBiome(Biomes.birchForest, BOPConfigurationTerrainGen.birchForestVillage); - addVillageBiome(Biomes.bog, BOPConfigurationTerrainGen.bogVillage); - addVillageBiome(Biomes.borealForest, BOPConfigurationTerrainGen.borealForestVillage); addVillageBiome(Biomes.brushland, BOPConfigurationTerrainGen.brushlandVillage); - addVillageBiome(Biomes.canyon, BOPConfigurationTerrainGen.canyonVillage); addVillageBiome(Biomes.chaparral, BOPConfigurationTerrainGen.chaparralVillage); - addVillageBiome(Biomes.cherryBlossomGrove, BOPConfigurationTerrainGen.cherryBlossomGroveVillage); - addVillageBiome(Biomes.coniferousForest, BOPConfigurationTerrainGen.coniferousForestVillage); - addVillageBiome(Biomes.coniferousForestSnow, BOPConfigurationTerrainGen.coniferousForestSnowVillage); - addVillageBiome(Biomes.deadForest, BOPConfigurationTerrainGen.deadForestVillage); - addVillageBiome(Biomes.deadForestSnow, BOPConfigurationTerrainGen.deadForestSnowVillage); - addVillageBiome(Biomes.deadSwamp, BOPConfigurationTerrainGen.deadSwampVillage); - addVillageBiome(Biomes.deciduousForest, BOPConfigurationTerrainGen.deciduousForestVillage); - addVillageBiome(Biomes.dunes, BOPConfigurationTerrainGen.dunesVillage); - addVillageBiome(Biomes.fen, BOPConfigurationTerrainGen.fenVillage); addVillageBiome(Biomes.field, BOPConfigurationTerrainGen.fieldVillage); - addVillageBiome(Biomes.frostForest, BOPConfigurationTerrainGen.frostForestVillage); - addVillageBiome(Biomes.glacier, BOPConfigurationTerrainGen.glacierVillage); addVillageBiome(Biomes.grassland, BOPConfigurationTerrainGen.grasslandVillage); addVillageBiome(Biomes.grove, BOPConfigurationTerrainGen.groveVillage); addVillageBiome(Biomes.heathland, BOPConfigurationTerrainGen.heathlandVillage); - addVillageBiome(Biomes.highland, BOPConfigurationTerrainGen.highlandVillage); - addVillageBiome(Biomes.hotSprings, BOPConfigurationTerrainGen.hotSpringsVillage); - addVillageBiome(Biomes.jadeCliffs, BOPConfigurationTerrainGen.jadeCliffsVillage); addVillageBiome(Biomes.lushDesert, BOPConfigurationTerrainGen.lushDesertVillage); addVillageBiome(Biomes.lushSwamp, BOPConfigurationTerrainGen.lushSwampVillage); - addVillageBiome(Biomes.mangrove, BOPConfigurationTerrainGen.mangroveVillage); - addVillageBiome(Biomes.mapleWoods, BOPConfigurationTerrainGen.mapleWoodsVillage); - addVillageBiome(Biomes.marsh, BOPConfigurationTerrainGen.marshVillage); addVillageBiome(Biomes.meadow, BOPConfigurationTerrainGen.meadowVillage); - addVillageBiome(Biomes.mesa, BOPConfigurationTerrainGen.mesaVillage); - addVillageBiome(Biomes.moor, BOPConfigurationTerrainGen.moorVillage); - addVillageBiome(Biomes.mountain, BOPConfigurationTerrainGen.mountainVillage); - addVillageBiome(Biomes.oasis, BOPConfigurationTerrainGen.oasisVillage); - addVillageBiome(Biomes.orchard, BOPConfigurationTerrainGen.orchardVillage); + addVillageBiome(Biomes.meadowForest, BOPConfigurationTerrainGen.meadowVillage); addVillageBiome(Biomes.outback, BOPConfigurationTerrainGen.outbackVillage); addVillageBiome(Biomes.overgrownGreens, BOPConfigurationTerrainGen.overgrownGreensVillage); - addVillageBiome(Biomes.pasture, BOPConfigurationTerrainGen.pastureVillage); - addVillageBiome(Biomes.polar, BOPConfigurationTerrainGen.polarVillage); addVillageBiome(Biomes.prairie, BOPConfigurationTerrainGen.prairieVillage); - addVillageBiome(Biomes.quagmire, BOPConfigurationTerrainGen.quagmireVillage); - addVillageBiome(Biomes.rainforest, BOPConfigurationTerrainGen.rainforestVillage); - addVillageBiome(Biomes.redwoodForest, BOPConfigurationTerrainGen.redwoodForestVillage); addVillageBiome(Biomes.savanna, BOPConfigurationTerrainGen.savannaVillage); addVillageBiome(Biomes.scrubland, BOPConfigurationTerrainGen.scrublandVillage); - addVillageBiome(Biomes.seasonalForest, BOPConfigurationTerrainGen.seasonalForestVillage); - addVillageBiome(Biomes.shield, BOPConfigurationTerrainGen.shieldVillage); addVillageBiome(Biomes.shrubland, BOPConfigurationTerrainGen.shrublandVillage); - addVillageBiome(Biomes.sludgepit, BOPConfigurationTerrainGen.sludgepitVillage); addVillageBiome(Biomes.spruceWoods, BOPConfigurationTerrainGen.spruceWoodsVillage); - addVillageBiome(Biomes.temperateRainforest, BOPConfigurationTerrainGen.temperateRainforestVillage); - addVillageBiome(Biomes.thicket, BOPConfigurationTerrainGen.thicketVillage); + addVillageBiome(Biomes.steppe, BOPConfigurationTerrainGen.steppeVillage); addVillageBiome(Biomes.timber, BOPConfigurationTerrainGen.timberVillage); addVillageBiome(Biomes.tropicalRainforest, BOPConfigurationTerrainGen.tropicalRainforestVillage); - addVillageBiome(Biomes.tropics, BOPConfigurationTerrainGen.tropicsVillage); addVillageBiome(Biomes.tundra, BOPConfigurationTerrainGen.tundraVillage); - addVillageBiome(Biomes.volcano, BOPConfigurationTerrainGen.volcanoVillage); - addVillageBiome(Biomes.wetland, BOPConfigurationTerrainGen.wetlandVillage); - addVillageBiome(Biomes.woodland, BOPConfigurationTerrainGen.woodlandVillage); addVillageBiome(Biomes.plainsNew, BOPConfigurationTerrainGen.plainsVillage); addVillageBiome(Biomes.desertNew, BOPConfigurationTerrainGen.desertVillage); - addVillageBiome(Biomes.forestNew, BOPConfigurationTerrainGen.forestVillage); - addVillageBiome(Biomes.extremeHillsNew, BOPConfigurationTerrainGen.extremeHillsVillage); - addVillageBiome(Biomes.taigaNew, BOPConfigurationTerrainGen.taigaVillage); - addVillageBiome(Biomes.swamplandNew, BOPConfigurationTerrainGen.swamplandVillage); - addVillageBiome(Biomes.jungleNew, BOPConfigurationTerrainGen.jungleVillage); } private static void addStrongholdBiomes() diff --git a/common/biomesoplenty/configuration/configfile/BOPConfigurationTerrainGen.java b/common/biomesoplenty/configuration/configfile/BOPConfigurationTerrainGen.java index 4f4bfdb0d..69b0926a9 100644 --- a/common/biomesoplenty/configuration/configfile/BOPConfigurationTerrainGen.java +++ b/common/biomesoplenty/configuration/configfile/BOPConfigurationTerrainGen.java @@ -26,91 +26,29 @@ public class BOPConfigurationTerrainGen public static int villageDistance; // Village biomes - public static boolean alpsVillage; public static boolean arcticVillage; - public static boolean autumnHillsVillage; - public static boolean badlandsVillage; - public static boolean bambooForestVillage; - public static boolean bayouVillage; - public static boolean birchForestVillage; - public static boolean bogVillage; - public static boolean borealForestVillage; public static boolean brushlandVillage; - public static boolean canyonVillage; public static boolean chaparralVillage; - public static boolean cherryBlossomGroveVillage; - public static boolean coniferousForestVillage; - public static boolean coniferousForestSnowVillage; - public static boolean cragVillage; - public static boolean deadForestVillage; - public static boolean deadForestSnowVillage; - public static boolean deadSwampVillage; - public static boolean deadlandsVillage; - public static boolean deciduousForestVillage; - public static boolean dunesVillage; - public static boolean fenVillage; public static boolean fieldVillage; - public static boolean frostForestVillage; - public static boolean fungiForestVillage; - public static boolean gardenVillage; - public static boolean glacierVillage; public static boolean grasslandVillage; public static boolean groveVillage; public static boolean heathlandVillage; - public static boolean highlandVillage; - public static boolean hotSpringsVillage; - public static boolean icyHillsVillage; - public static boolean jadeCliffsVillage; public static boolean lushDesertVillage; public static boolean lushSwampVillage; - public static boolean mangroveVillage; - public static boolean mapleWoodsVillage; - public static boolean marshVillage; public static boolean meadowVillage; - public static boolean mesaVillage; - public static boolean moorVillage; - public static boolean mountainVillage; - // public static boolean mushroomIslandVillage; - public static boolean mysticGroveVillage; - public static boolean oasisVillage; - public static boolean ominousWoodsVillage; - public static boolean orchardVillage; - public static boolean originValleyVillage; public static boolean outbackVillage; public static boolean overgrownGreensVillage; - public static boolean pastureVillage; - public static boolean polarVillage; public static boolean prairieVillage; - public static boolean quagmireVillage; - public static boolean rainforestVillage; - public static boolean redwoodForestVillage; - public static boolean sacredSpringsVillage; public static boolean savannaVillage; public static boolean scrublandVillage; - public static boolean seasonalForestVillage; - public static boolean shieldVillage; public static boolean shrublandVillage; - public static boolean silkgladesVillage; - public static boolean sludgepitVillage; public static boolean spruceWoodsVillage; public static boolean steppeVillage; - public static boolean temperateRainforestVillage; - public static boolean thicketVillage; public static boolean timberVillage; public static boolean tropicalRainforestVillage; - public static boolean tropicsVillage; public static boolean tundraVillage; - public static boolean volcanoVillage; - public static boolean wastelandVillage; - public static boolean wetlandVillage; - public static boolean woodlandVillage; public static boolean plainsVillage; public static boolean desertVillage; - public static boolean extremeHillsVillage; - public static boolean forestVillage; - public static boolean taigaVillage; - public static boolean swamplandVillage; - public static boolean jungleVillage; public static void init(File configFile) { @@ -139,93 +77,30 @@ public class BOPConfigurationTerrainGen } // Biomes with villages - alpsVillage = config.get("Allow Villages", "Alps", false).getBoolean(false); arcticVillage = config.get("Allow Villages", "Arctic", true).getBoolean(false); - autumnHillsVillage = config.get("Allow Villages", "AutumnHills", false).getBoolean(false); - badlandsVillage = config.get("Allow Villages", "Badlands", false).getBoolean(false); - bambooForestVillage = config.get("Allow Villages", "BambooForest", false).getBoolean(false); - bayouVillage = config.get("Allow Villages", "Bayou", false).getBoolean(false); - birchForestVillage = config.get("Allow Villages", "BirchForest", false).getBoolean(false); - bogVillage = config.get("Allow Villages", "Bog", false).getBoolean(false); - borealForestVillage = config.get("Allow Villages", "BorealForest", false).getBoolean(false); brushlandVillage = config.get("Allow Villages", "Brushland", true).getBoolean(false); - canyonVillage = config.get("Allow Villages", "Canyon", false).getBoolean(false); chaparralVillage = config.get("Allow Villages", "Chaparral", true).getBoolean(false); - cherryBlossomGroveVillage = config.get("Allow Villages", "CherryBlossomGrove", false).getBoolean(false); - coniferousForestVillage = config.get("Allow Villages", "ConiferousForest", false).getBoolean(false); - coniferousForestSnowVillage = config.get("Allow Villages", "ConiferousForestSnow", false).getBoolean(false); - cragVillage = config.get("Allow Villages", "Crag", false).getBoolean(false); - deadForestVillage = config.get("Allow Villages", "DeadForest", false).getBoolean(false); - deadForestSnowVillage = config.get("Allow Villages", "DeadForestSnow", false).getBoolean(false); - deadSwampVillage = config.get("Allow Villages", "DeadSwamp", false).getBoolean(false); - deadlandsVillage = config.get("Allow Villages", "Deadlands", false).getBoolean(false); - deciduousForestVillage = config.get("Allow Villages", "DeciduousForest", false).getBoolean(false); - dunesVillage = config.get("Allow Villages", "Dunes", false).getBoolean(false); - fenVillage = config.get("Allow Villages", "Fen", false).getBoolean(false); fieldVillage = config.get("Allow Villages", "Field", true).getBoolean(false); - frostForestVillage = config.get("Allow Villages", "FrostForest", false).getBoolean(false); - fungiForestVillage = config.get("Allow Villages", "FungiForest", false).getBoolean(false); - gardenVillage = config.get("Allow Villages", "Garden", false).getBoolean(false); - glacierVillage = config.get("Allow Villages", "Glacier", false).getBoolean(false); grasslandVillage = config.get("Allow Villages", "Grassland", true).getBoolean(false); groveVillage = config.get("Allow Villages", "Grove", true).getBoolean(false); heathlandVillage = config.get("Allow Villages", "Heathland", true).getBoolean(false); - highlandVillage = config.get("Allow Villages", "Highland", false).getBoolean(false); - hotSpringsVillage = config.get("Allow Villages", "HotSprings", false).getBoolean(false); - icyHillsVillage = config.get("Allow Villages", "IcyHills", false).getBoolean(false); - jadeCliffsVillage = config.get("Allow Villages", "JadeCliffs", false).getBoolean(false); - lushDesertVillage = config.get("Allow Villages", "LushDesert", true).getBoolean(false); lushSwampVillage = config.get("Allow Villages", "LushSwamp", true).getBoolean(false); - mangroveVillage = config.get("Allow Villages", "Mangrove", false).getBoolean(false); - mapleWoodsVillage = config.get("Allow Villages", "MapleWoods", false).getBoolean(false); - marshVillage = config.get("Allow Villages", "Marsh", false).getBoolean(false); meadowVillage = config.get("Allow Villages", "Meadow", true).getBoolean(false); - mesaVillage = config.get("Allow Villages", "Mesa", false).getBoolean(false); - moorVillage = config.get("Allow Villages", "Moor", false).getBoolean(false); - mountainVillage = config.get("Allow Villages", "Mountain", false).getBoolean(false); - // mushroomIslandVillage = config.get("Allow Villages", "MushroomIsland", false).getBoolean(false); - mysticGroveVillage = config.get("Allow Villages", "MysticGrove", false).getBoolean(false); - oasisVillage = config.get("Allow Villages", "Oasis", false).getBoolean(false); - ominousWoodsVillage = config.get("Allow Villages", "OminousWoods", false).getBoolean(false); - orchardVillage = config.get("Allow Villages", "Orchard", false).getBoolean(false); - originValleyVillage = config.get("Allow Villages", "OriginValley", false).getBoolean(false); outbackVillage = config.get("Allow Villages", "Outback", true).getBoolean(false); overgrownGreensVillage = config.get("Allow Villages", "OvergrownGreens", true).getBoolean(false); - pastureVillage = config.get("Allow Villages", "Pasture", false).getBoolean(false); - polarVillage = config.get("Allow Villages", "Polar", false).getBoolean(false); prairieVillage = config.get("Allow Villages", "Prairie", true).getBoolean(false); - quagmireVillage = config.get("Allow Villages", "Quagmire", false).getBoolean(false); - rainforestVillage = config.get("Allow Villages", "Rainforest", false).getBoolean(false); - redwoodForestVillage = config.get("Allow Villages", "RedwoodForest", false).getBoolean(false); - sacredSpringsVillage = config.get("Allow Villages", "SacredSprings", false).getBoolean(false); savannaVillage = config.get("Allow Villages", "Savanna", true).getBoolean(false); scrublandVillage = config.get("Allow Villages", "Scrubland", true).getBoolean(false); - seasonalForestVillage = config.get("Allow Villages", "SeasonalForest", false).getBoolean(false); - shieldVillage = config.get("Allow Villages", "Shield", false).getBoolean(false); shrublandVillage = config.get("Allow Villages", "Shrubland", true).getBoolean(false); - silkgladesVillage = config.get("Allow Villages", "Silkgladess", false).getBoolean(false); - sludgepitVillage = config.get("Allow Villages", "Sludgepit", false).getBoolean(false); spruceWoodsVillage = config.get("Allow Villages", "SpruceWoods", true).getBoolean(false); steppeVillage = config.get("Allow Villages", "Steppe", true).getBoolean(false); - temperateRainforestVillage = config.get("Allow Villages", "TemperateRainforest", false).getBoolean(false); - thicketVillage = config.get("Allow Villages", "Thicket", false).getBoolean(false); timberVillage = config.get("Allow Villages", "Timber", true).getBoolean(false); tropicalRainforestVillage = config.get("Allow Villages", "TropicalRainforest", true).getBoolean(false); - tropicsVillage = config.get("Allow Villages", "Tropics", false).getBoolean(false); tundraVillage = config.get("Allow Villages", "Tundra", true).getBoolean(false); - volcanoVillage = config.get("Allow Villages", "Volcano", false).getBoolean(false); - wastelandVillage = config.get("Allow Villages", "Wasteland", false).getBoolean(false); - wetlandVillage = config.get("Allow Villages", "Wetland", false).getBoolean(false); - woodlandVillage = config.get("Allow Villages", "Woodland", false).getBoolean(false); // Vanilla biomes desertVillage = config.get("Allow Villages", "Desert", true).getBoolean(true); - extremeHillsVillage = config.get("Allow Villages", "ExtremeHills", false).getBoolean(false); - forestVillage = config.get("Allow Villages", "Forest", false).getBoolean(false); - jungleVillage = config.get("Allow Villages", "Jungle", false).getBoolean(false); plainsVillage = config.get("Allow Villages", "Plains", true).getBoolean(true); - swamplandVillage = config.get("Allow Villages", "Swampland", false).getBoolean(false); - taigaVillage = config.get("Allow Villages", "Taiga", false).getBoolean(false); FMLCommonHandler.instance().getFMLLogger().log(Level.INFO, "[BiomesOPlenty] Generated Terrain Gen Config!"); } diff --git a/common/biomesoplenty/handlers/VillageMaterialEventHandler.java b/common/biomesoplenty/handlers/VillageMaterialEventHandler.java index 676062ecc..fd5455ea3 100644 --- a/common/biomesoplenty/handlers/VillageMaterialEventHandler.java +++ b/common/biomesoplenty/handlers/VillageMaterialEventHandler.java @@ -141,6 +141,357 @@ public class VillageMaterialEventHandler } } + //Brushland + if (event.biome == Biomes.brushland.get()) + { + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.sand.blockID; + event.setResult(Result.DENY); + } + } + + //Desert + if (event.biome == Biomes.desertNew.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Block.sandStone.blockID; + event.setResult(Result.DENY); + } + + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = Block.sandStone.blockID; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = Block.sandStone.blockID; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Block.stairsSandStone.blockID; + event.setResult(Result.DENY); + } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Block.stairsSandStone.blockID; + event.setResult(Result.DENY); + } + + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.sandStone.blockID; + event.setResult(Result.DENY); + } + } + + //Grove + if (event.biome == Biomes.grove.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Block.wood.blockID; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Block.leaves.blockID; + event.setResult(Result.DENY); + } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Block.stairsWoodSpruce.blockID; + event.setResult(Result.DENY); + } + + //Stone Slabs + if (event.original == Block.stoneSingleSlab.blockID) + { + event.replacement = Block.woodSingleSlab.blockID; + event.setResult(Result.DENY); + } + + //Lava + if (event.original == Block.lavaStill.blockID) + { + event.replacement = Block.waterStill.blockID; + event.setResult(Result.DENY); + } + if (event.original == Block.lavaMoving.blockID) + { + event.replacement = Block.waterMoving.blockID; + event.setResult(Result.DENY); + } + } + + //Heathland + if (event.biome == Biomes.heathland.get()) + { + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.sand.blockID; + event.setResult(Result.DENY); + } + } + + //Lush Desert + if (event.biome == Biomes.lushDesert.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Blocks.redRock.get().blockID; + event.setResult(Result.DENY); + } + + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = Blocks.logs1.get().blockID; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = Blocks.planks.get().blockID; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Blocks.acaciaStairs.get().blockID; + event.setResult(Result.DENY); + } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Blocks.redCobbleStairs.get().blockID; + event.setResult(Result.DENY); + } + + //Stone Slabs + if (event.original == Block.stoneSingleSlab.blockID) + { + event.replacement = Blocks.stoneSingleSlab.get().blockID; + event.setResult(Result.DENY); + } + + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.sand.blockID; + event.setResult(Result.DENY); + } + } + + //Lush Swamp + if (event.biome == Biomes.lushSwamp.get()) + { + //Gravel + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Block.cobblestoneMossy.blockID; + event.setResult(Result.DENY); + } + } + + //Meadow + if (event.biome == Biomes.meadow.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Block.wood.blockID; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Block.stairsWoodSpruce.blockID; + event.setResult(Result.DENY); + } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Block.stairsWoodSpruce.blockID; + event.setResult(Result.DENY); + } + + //Lava + if (event.original == Block.lavaStill.blockID) + { + event.replacement = Block.waterStill.blockID; + event.setResult(Result.DENY); + } + if (event.original == Block.lavaMoving.blockID) + { + event.replacement = Block.waterMoving.blockID; + event.setResult(Result.DENY); + } + } + + //Meadow Forest + if (event.biome == Biomes.meadowForest.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Block.wood.blockID; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Block.stairsWoodSpruce.blockID; + event.setResult(Result.DENY); + } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Block.stairsWoodSpruce.blockID; + event.setResult(Result.DENY); + } + + //Lava + if (event.original == Block.lavaStill.blockID) + { + event.replacement = Block.waterStill.blockID; + event.setResult(Result.DENY); + } + if (event.original == Block.lavaMoving.blockID) + { + event.replacement = Block.waterMoving.blockID; + event.setResult(Result.DENY); + } + } + + //Outback + if (event.biome == Biomes.outback.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Blocks.logs1.get().blockID; + event.setResult(Result.DENY); + } + + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = Blocks.logs1.get().blockID; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = Blocks.planks.get().blockID; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Block.leaves.blockID; + event.setResult(Result.DENY); + } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Blocks.acaciaStairs.get().blockID; + event.setResult(Result.DENY); + } + + //Stone Slabs + if (event.original == Block.stoneSingleSlab.blockID) + { + event.replacement = Blocks.woodenSingleSlab1.get().blockID; + event.setResult(Result.DENY); + } + + //Lava + if (event.original == Block.lavaStill.blockID) + { + event.replacement = Block.waterStill.blockID; + event.setResult(Result.DENY); + } + if (event.original == Block.lavaMoving.blockID) + { + event.replacement = Block.waterMoving.blockID; + event.setResult(Result.DENY); + } + + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.sand.blockID; + event.setResult(Result.DENY); + } + } + + //Overgrown Greens + if (event.biome == Biomes.overgrownGreens.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Block.cobblestoneMossy.blockID; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Block.leaves.blockID; + event.setResult(Result.DENY); + } + + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.grass.blockID; + event.setResult(Result.DENY); + } + } + + //Prairie + if (event.biome == Biomes.prairie.get()) + { + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.sand.blockID; + event.setResult(Result.DENY); + } + } + //Savanna if (event.biome == Biomes.savanna.get()) { @@ -205,5 +556,330 @@ public class VillageMaterialEventHandler event.setResult(Result.DENY); } } + + //Scrubland + if (event.biome == Biomes.scrubland.get()) + { + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.sand.blockID; + event.setResult(Result.DENY); + } + } + + //Spruce Woods + if (event.biome == Biomes.spruceWoods.get()) + { + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Block.stairsWoodSpruce.blockID; + event.setResult(Result.DENY); + } + } + + //Steppe + if (event.biome == Biomes.steppe.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Blocks.logs1.get().blockID; + event.setResult(Result.DENY); + } + + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = Blocks.logs1.get().blockID; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = Blocks.planks.get().blockID; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Blocks.acaciaStairs.get().blockID; + event.setResult(Result.DENY); + } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Blocks.acaciaStairs.get().blockID; + event.setResult(Result.DENY); + } + + //Stone Slabs + if (event.original == Block.stoneSingleSlab.blockID) + { + event.replacement = Blocks.woodenSingleSlab1.get().blockID; + event.setResult(Result.DENY); + } + + //Lava + if (event.original == Block.lavaStill.blockID) + { + event.replacement = Block.waterStill.blockID; + event.setResult(Result.DENY); + } + if (event.original == Block.lavaMoving.blockID) + { + event.replacement = Block.waterMoving.blockID; + event.setResult(Result.DENY); + } + + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.sand.blockID; + event.setResult(Result.DENY); + } + } + + //Tropical Rainforest + if (event.biome == Biomes.tropicalRainforest.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Block.wood.blockID; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = Block.stairsWoodJungle.blockID; + event.setResult(Result.DENY); + } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Block.stairsWoodJungle.blockID; + event.setResult(Result.DENY); + } + + //Lava + if (event.original == Block.lavaStill.blockID) + { + event.replacement = Block.waterStill.blockID; + event.setResult(Result.DENY); + } + if (event.original == Block.lavaMoving.blockID) + { + event.replacement = Block.waterMoving.blockID; + event.setResult(Result.DENY); + } + + //Gravel + if (event.original == Block.gravel.blockID) + { + event.replacement = Block.sand.blockID; + event.setResult(Result.DENY); + } + } + } + + @ForgeSubscribe + public void getVillageBlockMeta(BiomeEvent.GetVillageBlockMeta event) + { + //Desert + if (event.biome == Biomes.desertNew.get()) + { + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = 0; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = 2; + event.setResult(Result.DENY); + } + } + + //Grove + if (event.biome == Biomes.grove.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = 5; + event.setResult(Result.DENY); + } + + //Single Stone Slab + if (event.original == Block.stoneSingleSlab.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + } + + //Lush Desert + if (event.biome == Biomes.lushDesert.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + + //Single Stone Slab + if (event.original == Block.stoneSingleSlab.blockID) + { + event.replacement = 0; + event.setResult(Result.DENY); + } + } + + //Meadow + if (event.biome == Biomes.meadow.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + } + + //Meadow Forest + if (event.biome == Biomes.meadowForest.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + } + + //Outback + if (event.biome == Biomes.outback.get()) + { + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = 4; + event.setResult(Result.DENY); + } + } + + //Overgrown Greens + if (event.biome == Biomes.overgrownGreens.get()) + { + //Wooden Stairs + if (event.original == Block.stairsWoodOak.blockID) + { + event.replacement = 4; + event.setResult(Result.DENY); + } + } + + //Spruce Woods + if (event.biome == Biomes.spruceWoods.get()) + { + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = 1; + event.setResult(Result.DENY); + } + } + + //Tropical Rainforest + if (event.biome == Biomes.tropicalRainforest.get()) + { + //Cobblestone + if (event.original == Block.cobblestone.blockID) + { + event.replacement = 3; + event.setResult(Result.DENY); + } + + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = 3; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = 3; + event.setResult(Result.DENY); + } + } } } \ No newline at end of file diff --git a/common/biomesoplenty/worldgen/WorldGenMesa.java b/common/biomesoplenty/worldgen/WorldGenMesa.java index cf7f0117b..c48227c96 100644 --- a/common/biomesoplenty/worldgen/WorldGenMesa.java +++ b/common/biomesoplenty/worldgen/WorldGenMesa.java @@ -63,7 +63,7 @@ public class WorldGenMesa extends WorldGenerator { double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D); - if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && par1World.getBlockId(var38, var41, var44) == Blocks.redRock.get().blockID) + if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && par1World.getBlockId(var38, var41, var44) == Blocks.redRock.get().blockID && par1World.getBlockMetadata(var38, var41, var44) == 0) { par1World.setBlock(var38, var41, var44, minableBlockId); }