From a7a886b810c846d5c3405dd1db6f0e75c371a2f3 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Wed, 18 Sep 2013 23:57:33 -0400 Subject: [PATCH] More village material stuff --- .../handlers/VillageMaterialEventHandler.java | 226 ++++++++++++++++-- 1 file changed, 211 insertions(+), 15 deletions(-) diff --git a/common/biomesoplenty/handlers/VillageMaterialEventHandler.java b/common/biomesoplenty/handlers/VillageMaterialEventHandler.java index e05c8a840..6e1a2e624 100644 --- a/common/biomesoplenty/handlers/VillageMaterialEventHandler.java +++ b/common/biomesoplenty/handlers/VillageMaterialEventHandler.java @@ -60,7 +60,7 @@ public class VillageMaterialEventHandler //Glass Panes if (event.original == Block.thinGlass.blockID) { - event.replacement = Block.blockSnow.blockID; + event.replacement = Block.ice.blockID; event.setResult(Result.DENY); } @@ -71,13 +71,6 @@ public class VillageMaterialEventHandler event.setResult(Result.DENY); } - //Fences - if (event.original == Block.fence.blockID) - { - event.replacement = Block.cobblestoneWall.blockID; - event.setResult(Result.DENY); - } - //Double Stone Slabs if (event.original == Block.stoneDoubleSlab.blockID) { @@ -132,13 +125,6 @@ public class VillageMaterialEventHandler event.replacement = Block.dirt.blockID; event.setResult(Result.DENY); } - - //Pressure Plate - if (event.original == Block.pressurePlatePlanks.blockID) - { - event.replacement = 0; - event.setResult(Result.DENY); - } } //Birch Forest @@ -166,6 +152,13 @@ public class VillageMaterialEventHandler //Coniferous Forest if (event.biome == Biomes.coniferousForest.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) { @@ -186,6 +179,39 @@ public class VillageMaterialEventHandler event.replacement = Blocks.firStairs.get().blockID; event.setResult(Result.DENY); } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Blocks.firStairs.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); + } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Desert @@ -276,11 +302,39 @@ public class VillageMaterialEventHandler event.replacement = Block.waterMoving.blockID; event.setResult(Result.DENY); } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Heathland if (event.biome == Biomes.heathland.get()) { + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = Blocks.logs4.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.jacarandaStairs.get().blockID; + event.setResult(Result.DENY); + } + //Gravel if (event.original == Block.gravel.blockID) { @@ -340,6 +394,13 @@ public class VillageMaterialEventHandler event.replacement = Block.sand.blockID; event.setResult(Result.DENY); } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Lush Swamp @@ -406,6 +467,13 @@ public class VillageMaterialEventHandler event.replacement = Block.waterMoving.blockID; event.setResult(Result.DENY); } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Meadow Forest @@ -450,6 +518,13 @@ public class VillageMaterialEventHandler event.replacement = Block.waterMoving.blockID; event.setResult(Result.DENY); } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Outback @@ -515,6 +590,13 @@ public class VillageMaterialEventHandler event.replacement = Block.sand.blockID; event.setResult(Result.DENY); } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Overgrown Greens @@ -616,6 +698,13 @@ public class VillageMaterialEventHandler event.replacement = Block.sand.blockID; event.setResult(Result.DENY); } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Scrubland @@ -632,6 +721,13 @@ public class VillageMaterialEventHandler //Snowy Coniferous Forest if (event.biome == Biomes.coniferousForestSnow.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) { @@ -652,6 +748,39 @@ public class VillageMaterialEventHandler event.replacement = Blocks.firStairs.get().blockID; event.setResult(Result.DENY); } + + //Cobblestone Stairs + if (event.original == Block.stairsCobblestone.blockID) + { + event.replacement = Blocks.firStairs.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); + } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Spruce Woods @@ -728,6 +857,13 @@ public class VillageMaterialEventHandler event.replacement = Block.sand.blockID; event.setResult(Result.DENY); } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Tropical Rainforest @@ -754,6 +890,13 @@ public class VillageMaterialEventHandler 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) { @@ -772,6 +915,13 @@ public class VillageMaterialEventHandler event.replacement = Block.sand.blockID; event.setResult(Result.DENY); } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } //Wetland @@ -830,6 +980,13 @@ public class VillageMaterialEventHandler event.replacement = Block.waterMoving.blockID; event.setResult(Result.DENY); } + + //Glass Panes + if (event.original == Block.thinGlass.blockID) + { + event.replacement = Block.fenceIron.blockID; + event.setResult(Result.DENY); + } } } @@ -870,6 +1027,13 @@ public class VillageMaterialEventHandler event.replacement = 3; event.setResult(Result.DENY); } + + //Single Stone Slab + if (event.original == Block.stoneSingleSlab.blockID) + { + event.replacement = 3; + event.setResult(Result.DENY); + } } //Desert @@ -929,6 +1093,24 @@ public class VillageMaterialEventHandler } } + //Heathland + if (event.biome == Biomes.heathland.get()) + { + //Logs + if (event.original == Block.wood.blockID) + { + event.replacement = 2; + event.setResult(Result.DENY); + } + + //Wooden Planks + if (event.original == Block.planks.blockID) + { + event.replacement = 13; + event.setResult(Result.DENY); + } + } + //Lush Desert if (event.biome == Biomes.lushDesert.get()) { @@ -1074,6 +1256,13 @@ public class VillageMaterialEventHandler event.replacement = 3; event.setResult(Result.DENY); } + + //Single Stone Slab + if (event.original == Block.stoneSingleSlab.blockID) + { + event.replacement = 3; + event.setResult(Result.DENY); + } } //Spruce Woods @@ -1117,6 +1306,13 @@ public class VillageMaterialEventHandler event.replacement = 3; event.setResult(Result.DENY); } + + //Single Stone Slab + if (event.original == Block.stoneSingleSlab.blockID) + { + event.replacement = 3; + event.setResult(Result.DENY); + } } //Wetland