From e4aae0748644553a6abc4aa0c6166d97002899dc Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Sat, 14 Sep 2013 19:01:07 -0400 Subject: [PATCH] Started on village material replacement, cleaned up imports --- .../api/aspects/IAspectContainerItem.java | 1 - .../api/crafting/ShapedArcaneRecipe.java | 1 - common/biomesoplenty/BiomesOPlenty.java | 2 + .../biomes/nether/BiomeGenNetherBase.java | 2 +- .../biomes/nether/BiomeGenNetherBone.java | 2 +- .../biomes/nether/BiomeGenNetherDesert.java | 2 +- .../configuration/BOPBiomes.java | 91 ++++++++++++++++++- .../handlers/VillageMaterialEventHandler.java | 21 +++++ .../integration/MultipartIntegration.java | 4 +- .../world/layer/BiomeLayerCreate.java | 2 +- .../worldgen/WorldGenBOPPumpkin.java | 1 + .../biomesoplenty/worldgen/WorldGenKelp.java | 2 +- .../worldgen/WorldGenShortKelp.java | 2 +- 13 files changed, 122 insertions(+), 11 deletions(-) create mode 100644 common/biomesoplenty/handlers/VillageMaterialEventHandler.java diff --git a/apis/thaumcraft/api/aspects/IAspectContainerItem.java b/apis/thaumcraft/api/aspects/IAspectContainerItem.java index 9f9fb3360..1b2a5d5a1 100755 --- a/apis/thaumcraft/api/aspects/IAspectContainerItem.java +++ b/apis/thaumcraft/api/aspects/IAspectContainerItem.java @@ -1,7 +1,6 @@ package thaumcraft.api.aspects; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; /** * diff --git a/apis/thaumcraft/api/crafting/ShapedArcaneRecipe.java b/apis/thaumcraft/api/crafting/ShapedArcaneRecipe.java index 4496365b7..91da6559a 100755 --- a/apis/thaumcraft/api/crafting/ShapedArcaneRecipe.java +++ b/apis/thaumcraft/api/crafting/ShapedArcaneRecipe.java @@ -6,7 +6,6 @@ import java.util.HashMap; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; diff --git a/common/biomesoplenty/BiomesOPlenty.java b/common/biomesoplenty/BiomesOPlenty.java index 6e296f42a..45580ad3b 100644 --- a/common/biomesoplenty/BiomesOPlenty.java +++ b/common/biomesoplenty/BiomesOPlenty.java @@ -24,6 +24,7 @@ import biomesoplenty.handlers.MovementHandler; import biomesoplenty.handlers.SoundHandler; import biomesoplenty.handlers.TickHandlerClient; import biomesoplenty.handlers.TickHandlerServer; +import biomesoplenty.handlers.VillageMaterialEventHandler; import biomesoplenty.helpers.AchievementHelper; import biomesoplenty.helpers.CreativeTabsBOP; import biomesoplenty.helpers.Localizations; @@ -108,6 +109,7 @@ public class BiomesOPlenty MinecraftForge.EVENT_BUS.register(new BreakSpeedHandler()); MinecraftForge.EVENT_BUS.register(new MovementHandler()); MinecraftForge.EVENT_BUS.register(new FlipperMovementEventHandler()); + MinecraftForge.EVENT_BUS.register(new VillageMaterialEventHandler()); //MinecraftForge.EVENT_BUS.register(new AxeChopHandler()); proxy.registerRenderers(); diff --git a/common/biomesoplenty/biomes/nether/BiomeGenNetherBase.java b/common/biomesoplenty/biomes/nether/BiomeGenNetherBase.java index bca6675c0..87bcf7d3f 100644 --- a/common/biomesoplenty/biomes/nether/BiomeGenNetherBase.java +++ b/common/biomesoplenty/biomes/nether/BiomeGenNetherBase.java @@ -1,12 +1,12 @@ package biomesoplenty.biomes.nether; -import biomesoplenty.biomes.BiomeDecoratorBOP; import net.minecraft.block.Block; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.monster.EntityMagmaCube; import net.minecraft.entity.monster.EntityPigZombie; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.SpawnListEntry; +import biomesoplenty.biomes.BiomeDecoratorBOP; public class BiomeGenNetherBase extends BiomeGenBase { diff --git a/common/biomesoplenty/biomes/nether/BiomeGenNetherBone.java b/common/biomesoplenty/biomes/nether/BiomeGenNetherBone.java index dc0097c3c..554a7c201 100644 --- a/common/biomesoplenty/biomes/nether/BiomeGenNetherBone.java +++ b/common/biomesoplenty/biomes/nether/BiomeGenNetherBone.java @@ -1,12 +1,12 @@ package biomesoplenty.biomes.nether; -import biomesoplenty.biomes.BiomeDecoratorBOP; import net.minecraft.block.Block; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.monster.EntityMagmaCube; import net.minecraft.entity.monster.EntityPigZombie; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.SpawnListEntry; +import biomesoplenty.biomes.BiomeDecoratorBOP; public class BiomeGenNetherBone extends BiomeGenBase { diff --git a/common/biomesoplenty/biomes/nether/BiomeGenNetherDesert.java b/common/biomesoplenty/biomes/nether/BiomeGenNetherDesert.java index 7ffe8c357..c1717f36e 100644 --- a/common/biomesoplenty/biomes/nether/BiomeGenNetherDesert.java +++ b/common/biomesoplenty/biomes/nether/BiomeGenNetherDesert.java @@ -1,12 +1,12 @@ package biomesoplenty.biomes.nether; -import biomesoplenty.biomes.BiomeDecoratorBOP; import net.minecraft.block.Block; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.monster.EntityMagmaCube; import net.minecraft.entity.monster.EntityPigZombie; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.SpawnListEntry; +import biomesoplenty.biomes.BiomeDecoratorBOP; public class BiomeGenNetherDesert extends BiomeGenBase { diff --git a/common/biomesoplenty/configuration/BOPBiomes.java b/common/biomesoplenty/configuration/BOPBiomes.java index bc413f6bb..fb667a336 100644 --- a/common/biomesoplenty/configuration/BOPBiomes.java +++ b/common/biomesoplenty/configuration/BOPBiomes.java @@ -10,7 +10,96 @@ import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; import net.minecraftforge.common.BiomeManager; import biomesoplenty.api.Biomes; -import biomesoplenty.biomes.*; +import biomesoplenty.biomes.BiomeGenAlps; +import biomesoplenty.biomes.BiomeGenAlpsBase; +import biomesoplenty.biomes.BiomeGenAlpsForest; +import biomesoplenty.biomes.BiomeGenArctic; +import biomesoplenty.biomes.BiomeGenAutumnHills; +import biomesoplenty.biomes.BiomeGenBadlands; +import biomesoplenty.biomes.BiomeGenBambooForest; +import biomesoplenty.biomes.BiomeGenBayou; +import biomesoplenty.biomes.BiomeGenBirchForest; +import biomesoplenty.biomes.BiomeGenBog; +import biomesoplenty.biomes.BiomeGenBorealForest; +import biomesoplenty.biomes.BiomeGenBrushland; +import biomesoplenty.biomes.BiomeGenCanyon; +import biomesoplenty.biomes.BiomeGenCanyonRavine; +import biomesoplenty.biomes.BiomeGenChaparral; +import biomesoplenty.biomes.BiomeGenCherryBlossomGrove; +import biomesoplenty.biomes.BiomeGenConiferousForest; +import biomesoplenty.biomes.BiomeGenConiferousForestSnow; +import biomesoplenty.biomes.BiomeGenCrag; +import biomesoplenty.biomes.BiomeGenDeadForest; +import biomesoplenty.biomes.BiomeGenDeadForestSnow; +import biomesoplenty.biomes.BiomeGenDeadSwamp; +import biomesoplenty.biomes.BiomeGenDeadlands; +import biomesoplenty.biomes.BiomeGenDeciduousForest; +import biomesoplenty.biomes.BiomeGenDunes; +import biomesoplenty.biomes.BiomeGenFen; +import biomesoplenty.biomes.BiomeGenField; +import biomesoplenty.biomes.BiomeGenFieldForest; +import biomesoplenty.biomes.BiomeGenFrostForest; +import biomesoplenty.biomes.BiomeGenFungiForest; +import biomesoplenty.biomes.BiomeGenGarden; +import biomesoplenty.biomes.BiomeGenGlacier; +import biomesoplenty.biomes.BiomeGenGrassland; +import biomesoplenty.biomes.BiomeGenGrove; +import biomesoplenty.biomes.BiomeGenHeathland; +import biomesoplenty.biomes.BiomeGenHighland; +import biomesoplenty.biomes.BiomeGenHotSprings; +import biomesoplenty.biomes.BiomeGenIcyHills; +import biomesoplenty.biomes.BiomeGenJadeCliffs; +import biomesoplenty.biomes.BiomeGenLushDesert; +import biomesoplenty.biomes.BiomeGenLushSwamp; +import biomesoplenty.biomes.BiomeGenMangrove; +import biomesoplenty.biomes.BiomeGenMapleWoods; +import biomesoplenty.biomes.BiomeGenMarsh; +import biomesoplenty.biomes.BiomeGenMeadow; +import biomesoplenty.biomes.BiomeGenMeadowForest; +import biomesoplenty.biomes.BiomeGenMesa; +import biomesoplenty.biomes.BiomeGenMoor; +import biomesoplenty.biomes.BiomeGenMountain; +import biomesoplenty.biomes.BiomeGenMysticGrove; +import biomesoplenty.biomes.BiomeGenOasis; +import biomesoplenty.biomes.BiomeGenOminousWoods; +import biomesoplenty.biomes.BiomeGenOminousWoodsThick; +import biomesoplenty.biomes.BiomeGenOrchard; +import biomesoplenty.biomes.BiomeGenOriginValley; +import biomesoplenty.biomes.BiomeGenOutback; +import biomesoplenty.biomes.BiomeGenOvergrownGreens; +import biomesoplenty.biomes.BiomeGenPasture; +import biomesoplenty.biomes.BiomeGenPastureMeadow; +import biomesoplenty.biomes.BiomeGenPastureThin; +import biomesoplenty.biomes.BiomeGenPolar; +import biomesoplenty.biomes.BiomeGenPrairie; +import biomesoplenty.biomes.BiomeGenQuagmire; +import biomesoplenty.biomes.BiomeGenRainforest; +import biomesoplenty.biomes.BiomeGenRedwoodForest; +import biomesoplenty.biomes.BiomeGenSacredSprings; +import biomesoplenty.biomes.BiomeGenSavanna; +import biomesoplenty.biomes.BiomeGenSavannaPlateau; +import biomesoplenty.biomes.BiomeGenScrubland; +import biomesoplenty.biomes.BiomeGenSeasonalForest; +import biomesoplenty.biomes.BiomeGenSeasonalSpruceForest; +import biomesoplenty.biomes.BiomeGenShield; +import biomesoplenty.biomes.BiomeGenShore; +import biomesoplenty.biomes.BiomeGenShrubland; +import biomesoplenty.biomes.BiomeGenShrublandForest; +import biomesoplenty.biomes.BiomeGenSilkglades; +import biomesoplenty.biomes.BiomeGenSludgepit; +import biomesoplenty.biomes.BiomeGenSpruceWoods; +import biomesoplenty.biomes.BiomeGenSteppe; +import biomesoplenty.biomes.BiomeGenTemperateRainforest; +import biomesoplenty.biomes.BiomeGenThicket; +import biomesoplenty.biomes.BiomeGenTimber; +import biomesoplenty.biomes.BiomeGenTimberThin; +import biomesoplenty.biomes.BiomeGenTropicalRainforest; +import biomesoplenty.biomes.BiomeGenTropics; +import biomesoplenty.biomes.BiomeGenTundra; +import biomesoplenty.biomes.BiomeGenVolcano; +import biomesoplenty.biomes.BiomeGenWasteland; +import biomesoplenty.biomes.BiomeGenWetland; +import biomesoplenty.biomes.BiomeGenWoodland; import biomesoplenty.biomes.beach.BiomeGenBeachGravel; import biomesoplenty.biomes.beach.BiomeGenBeachOvergrown; import biomesoplenty.biomes.nether.BiomeGenNetherBase; diff --git a/common/biomesoplenty/handlers/VillageMaterialEventHandler.java b/common/biomesoplenty/handlers/VillageMaterialEventHandler.java new file mode 100644 index 000000000..5074f4801 --- /dev/null +++ b/common/biomesoplenty/handlers/VillageMaterialEventHandler.java @@ -0,0 +1,21 @@ +package biomesoplenty.handlers; + +import net.minecraft.block.Block; +import net.minecraftforge.event.ForgeSubscribe; +import net.minecraftforge.event.terraingen.BiomeEvent; +import biomesoplenty.api.Biomes; + +public class VillageMaterialEventHandler +{ + @ForgeSubscribe + public void getVillageBlockID(BiomeEvent.GetVillageBlockID event) + { + if (event.biome == Biomes.savanna.get()) + { + if (event.original == Block.cobblestone.blockID) + { + event.replacement = Block.brick.blockID; + } + } + } +} \ No newline at end of file diff --git a/common/biomesoplenty/integration/MultipartIntegration.java b/common/biomesoplenty/integration/MultipartIntegration.java index f2399db1d..c91448e91 100644 --- a/common/biomesoplenty/integration/MultipartIntegration.java +++ b/common/biomesoplenty/integration/MultipartIntegration.java @@ -1,9 +1,9 @@ package biomesoplenty.integration; import net.minecraft.block.Block; -import codechicken.microblock.MicroMaterialRegistry; -import codechicken.microblock.BlockMicroMaterial; import biomesoplenty.api.Blocks; +import codechicken.microblock.BlockMicroMaterial; +import codechicken.microblock.MicroMaterialRegistry; public class MultipartIntegration { diff --git a/common/biomesoplenty/world/layer/BiomeLayerCreate.java b/common/biomesoplenty/world/layer/BiomeLayerCreate.java index d1a40b3e7..0a0313f8e 100644 --- a/common/biomesoplenty/world/layer/BiomeLayerCreate.java +++ b/common/biomesoplenty/world/layer/BiomeLayerCreate.java @@ -1,8 +1,8 @@ package biomesoplenty.world.layer; import net.minecraft.world.gen.layer.IntCache; -import biomesoplenty.configuration.configfile.BOPConfigurationBiomeGen; import biomesoplenty.api.Biomes; +import biomesoplenty.configuration.configfile.BOPConfigurationBiomeGen; public class BiomeLayerCreate extends BiomeLayer { diff --git a/common/biomesoplenty/worldgen/WorldGenBOPPumpkin.java b/common/biomesoplenty/worldgen/WorldGenBOPPumpkin.java index 342368383..2ed6a98b5 100644 --- a/common/biomesoplenty/worldgen/WorldGenBOPPumpkin.java +++ b/common/biomesoplenty/worldgen/WorldGenBOPPumpkin.java @@ -1,6 +1,7 @@ package biomesoplenty.worldgen; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; diff --git a/common/biomesoplenty/worldgen/WorldGenKelp.java b/common/biomesoplenty/worldgen/WorldGenKelp.java index c0a812928..c0495632d 100644 --- a/common/biomesoplenty/worldgen/WorldGenKelp.java +++ b/common/biomesoplenty/worldgen/WorldGenKelp.java @@ -3,10 +3,10 @@ package biomesoplenty.worldgen; import java.util.Random; import net.minecraft.block.Block; +import net.minecraft.block.material.Material; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import biomesoplenty.api.Blocks; -import net.minecraft.block.material.Material; public class WorldGenKelp extends WorldGenerator { diff --git a/common/biomesoplenty/worldgen/WorldGenShortKelp.java b/common/biomesoplenty/worldgen/WorldGenShortKelp.java index e6fb9006c..a52def28f 100644 --- a/common/biomesoplenty/worldgen/WorldGenShortKelp.java +++ b/common/biomesoplenty/worldgen/WorldGenShortKelp.java @@ -3,10 +3,10 @@ package biomesoplenty.worldgen; import java.util.Random; import net.minecraft.block.Block; +import net.minecraft.block.material.Material; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; import biomesoplenty.api.Blocks; -import net.minecraft.block.material.Material; public class WorldGenShortKelp extends WorldGenerator {