Added more default village biomes

This commit is contained in:
Matt Caughey 2013-09-15 14:58:32 -04:00
parent d04322375e
commit 6ad3ee2363
3 changed files with 243 additions and 0 deletions

View File

@ -524,12 +524,17 @@ public class BOPBiomes {
addVillageBiome(Biomes.arctic, BOPConfigurationTerrainGen.arcticVillage);
addVillageBiome(Biomes.brushland, BOPConfigurationTerrainGen.brushlandVillage);
addVillageBiome(Biomes.chaparral, BOPConfigurationTerrainGen.chaparralVillage);
addVillageBiome(Biomes.coniferousForest, BOPConfigurationTerrainGen.coniferousForestVillage);
addVillageBiome(Biomes.coniferousForestSnow, BOPConfigurationTerrainGen.coniferousForestSnowVillage);
addVillageBiome(Biomes.deciduousForest, BOPConfigurationTerrainGen.deciduousForestVillage);
addVillageBiome(Biomes.frostForest, BOPConfigurationTerrainGen.frostForestVillage);
addVillageBiome(Biomes.field, BOPConfigurationTerrainGen.fieldVillage);
addVillageBiome(Biomes.grassland, BOPConfigurationTerrainGen.grasslandVillage);
addVillageBiome(Biomes.grove, BOPConfigurationTerrainGen.groveVillage);
addVillageBiome(Biomes.heathland, BOPConfigurationTerrainGen.heathlandVillage);
addVillageBiome(Biomes.lushDesert, BOPConfigurationTerrainGen.lushDesertVillage);
addVillageBiome(Biomes.lushSwamp, BOPConfigurationTerrainGen.lushSwampVillage);
addVillageBiome(Biomes.mapleWoods, BOPConfigurationTerrainGen.mapleWoodsVillage);
addVillageBiome(Biomes.meadow, BOPConfigurationTerrainGen.meadowVillage);
addVillageBiome(Biomes.meadowForest, BOPConfigurationTerrainGen.meadowVillage);
addVillageBiome(Biomes.outback, BOPConfigurationTerrainGen.outbackVillage);
@ -543,9 +548,12 @@ public class BOPBiomes {
addVillageBiome(Biomes.timber, BOPConfigurationTerrainGen.timberVillage);
addVillageBiome(Biomes.tropicalRainforest, BOPConfigurationTerrainGen.tropicalRainforestVillage);
addVillageBiome(Biomes.tundra, BOPConfigurationTerrainGen.tundraVillage);
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);
}
private static void addStrongholdBiomes()

View File

@ -29,12 +29,17 @@ public class BOPConfigurationTerrainGen
public static boolean arcticVillage;
public static boolean brushlandVillage;
public static boolean chaparralVillage;
public static boolean coniferousForestVillage;
public static boolean coniferousForestSnowVillage;
public static boolean deciduousForestVillage;
public static boolean frostForestVillage;
public static boolean fieldVillage;
public static boolean grasslandVillage;
public static boolean groveVillage;
public static boolean heathlandVillage;
public static boolean lushDesertVillage;
public static boolean lushSwampVillage;
public static boolean mapleWoodsVillage;
public static boolean meadowVillage;
public static boolean outbackVillage;
public static boolean overgrownGreensVillage;
@ -47,8 +52,11 @@ public class BOPConfigurationTerrainGen
public static boolean timberVillage;
public static boolean tropicalRainforestVillage;
public static boolean tundraVillage;
public static boolean wetlandVillage;
public static boolean woodlandVillage;
public static boolean plainsVillage;
public static boolean desertVillage;
public static boolean forestVillage;
public static void init(File configFile)
{
@ -80,11 +88,16 @@ public class BOPConfigurationTerrainGen
arcticVillage = config.get("Allow Villages", "Arctic", true).getBoolean(false);
brushlandVillage = config.get("Allow Villages", "Brushland", true).getBoolean(false);
chaparralVillage = config.get("Allow Villages", "Chaparral", true).getBoolean(false);
coniferousForestVillage = config.get("Allow Villages", "ConiferousForest", true).getBoolean(false);
coniferousForestSnowVillage = config.get("Allow Villages", "SnowyConiferousForest", true).getBoolean(false);
deciduousForestVillage = config.get("Allow Villages", "DeciduousForest", true).getBoolean(false);
frostForestVillage = config.get("Allow Villages", "FrostForest", true).getBoolean(false);
fieldVillage = config.get("Allow Villages", "Field", true).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);
lushSwampVillage = config.get("Allow Villages", "LushSwamp", true).getBoolean(false);
mapleWoodsVillage = config.get("Allow Villages", "MapleWoods", true).getBoolean(false);
meadowVillage = config.get("Allow Villages", "Meadow", true).getBoolean(false);
outbackVillage = config.get("Allow Villages", "Outback", true).getBoolean(false);
overgrownGreensVillage = config.get("Allow Villages", "OvergrownGreens", true).getBoolean(false);
@ -97,9 +110,12 @@ public class BOPConfigurationTerrainGen
timberVillage = config.get("Allow Villages", "Timber", true).getBoolean(false);
tropicalRainforestVillage = config.get("Allow Villages", "TropicalRainforest", true).getBoolean(false);
tundraVillage = config.get("Allow Villages", "Tundra", true).getBoolean(false);
wetlandVillage = config.get("Allow Villages", "Wetland", true).getBoolean(false);
woodlandVillage = config.get("Allow Villages", "Woodland", true).getBoolean(false);
// Vanilla biomes
desertVillage = config.get("Allow Villages", "Desert", true).getBoolean(true);
forestVillage = config.get("Allow Villages", "Forest", true).getBoolean(true);
plainsVillage = config.get("Allow Villages", "Plains", true).getBoolean(true);
FMLCommonHandler.instance().getFMLLogger().log(Level.INFO, "[BiomesOPlenty] Generated Terrain Gen Config!");

View File

@ -152,6 +152,31 @@ public class VillageMaterialEventHandler
}
}
//Coniferous Forest
if (event.biome == Biomes.coniferousForest.get())
{
//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.firStairs.get().blockID;
event.setResult(Result.DENY);
}
}
//Desert
if (event.biome == Biomes.desertNew.get())
{
@ -317,6 +342,17 @@ public class VillageMaterialEventHandler
}
}
//Maple Woods
if (event.biome == Biomes.spruceWoods.get())
{
//Wooden Stairs
if (event.original == Block.stairsWoodOak.blockID)
{
event.replacement = Block.stairsWoodSpruce.blockID;
event.setResult(Result.DENY);
}
}
//Meadow
if (event.biome == Biomes.meadow.get())
{
@ -568,6 +604,31 @@ public class VillageMaterialEventHandler
}
}
//Snowy Coniferous Forest
if (event.biome == Biomes.coniferousForestSnow.get())
{
//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.firStairs.get().blockID;
event.setResult(Result.DENY);
}
}
//Spruce Woods
if (event.biome == Biomes.spruceWoods.get())
{
@ -687,11 +748,94 @@ public class VillageMaterialEventHandler
event.setResult(Result.DENY);
}
}
//Wetland
if (event.biome == Biomes.wetland.get())
{
//Cobblestone
if (event.original == Block.cobblestone.blockID)
{
event.replacement = Blocks.logs3.get().blockID;
event.setResult(Result.DENY);
}
//Logs
if (event.original == Block.wood.blockID)
{
event.replacement = Blocks.logs3.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.willowStairs.get().blockID;
event.setResult(Result.DENY);
}
//Cobblestone Stairs
if (event.original == Block.stairsCobblestone.blockID)
{
event.replacement = Blocks.willowStairs.get().blockID;
event.setResult(Result.DENY);
}
//Stone Slabs
if (event.original == Block.stoneSingleSlab.blockID)
{
event.replacement = Blocks.woodenSingleSlab2.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);
}
}
}
@ForgeSubscribe
public void getVillageBlockMeta(BiomeEvent.GetVillageBlockMeta event)
{
//Coniferous Forest
if (event.biome == Biomes.coniferousForest.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);
}
}
//Desert
if (event.biome == Biomes.desertNew.get())
{
@ -767,6 +911,24 @@ public class VillageMaterialEventHandler
}
}
//Maple 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);
}
}
//Meadow
if (event.biome == Biomes.meadow.get())
{
@ -839,6 +1001,31 @@ public class VillageMaterialEventHandler
}
}
//Snowy Coniferous Forest
if (event.biome == Biomes.coniferousForestSnow.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);
}
}
//Spruce Woods
if (event.biome == Biomes.spruceWoods.get())
{
@ -881,5 +1068,37 @@ public class VillageMaterialEventHandler
event.setResult(Result.DENY);
}
}
//Wetland
if (event.biome == Biomes.wetland.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 = 9;
event.setResult(Result.DENY);
}
//Single Stone Slab
if (event.original == Block.stoneSingleSlab.blockID)
{
event.replacement = 1;
event.setResult(Result.DENY);
}
}
}
}