From 1895633608c1f39dc60f3f77a7957f931a67e6c4 Mon Sep 17 00:00:00 2001 From: StevenRS11 Date: Wed, 26 Jun 2013 22:22:02 -0400 Subject: [PATCH 1/2] Added rotation helper class --- .../helpers/BlockRotationHelper.java | 391 ++++++++++++++++++ 1 file changed, 391 insertions(+) create mode 100644 StevenDimDoors/mod_pocketDim/helpers/BlockRotationHelper.java diff --git a/StevenDimDoors/mod_pocketDim/helpers/BlockRotationHelper.java b/StevenDimDoors/mod_pocketDim/helpers/BlockRotationHelper.java new file mode 100644 index 00000000..672c64bb --- /dev/null +++ b/StevenDimDoors/mod_pocketDim/helpers/BlockRotationHelper.java @@ -0,0 +1,391 @@ +package StevenDimDoors.mod_pocketDim.helpers; + +import java.util.HashMap; + +import net.minecraft.block.Block; + +public class BlockRotationHelper +{ + public HashMap>> rotationMappings = new HashMap>>(); + + public BlockRotationHelper() + { + this.InitializeRotationMap(); + } + + + + public void InitializeRotationMap() + { + HashMap> orientation0 = new HashMap>(); + + HashMap stairs0 = new HashMap(); + + stairs0.put(0, 2); + stairs0.put(1, 3); + stairs0.put(2, 1); + stairs0.put(3, 0); + stairs0.put(7, 4); + stairs0.put(6, 5); + stairs0.put(5, 7); + stairs0.put(4, 6); + + + + + HashMap chestsLadders0 = new HashMap(); + + chestsLadders0.put(2, 5); + chestsLadders0.put(3, 4); + chestsLadders0.put(4, 2); + chestsLadders0.put(5, 3); + + + + HashMap vine0 = new HashMap(); + + vine0.put(1, 2); + vine0.put(2, 4); + vine0.put(4, 8); + vine0.put(8, 1); + + orientation0.put(Block.vine.blockID, vine0); + + HashMap leverButtonTorch0 = new HashMap(); + + leverButtonTorch0.put(12, 9); + leverButtonTorch0.put(11, 10); + leverButtonTorch0.put(10, 12); + leverButtonTorch0.put(9, 11); + leverButtonTorch0.put(2, 4); + leverButtonTorch0.put(3, 2); + leverButtonTorch0.put(1, 3); + leverButtonTorch0.put(4, 1); + + + + HashMap pistonDropperDispenser0 = new HashMap(); + + pistonDropperDispenser0.put(4, 2); + pistonDropperDispenser0.put(5, 3); + pistonDropperDispenser0.put(13, 11); + pistonDropperDispenser0.put(3, 4); + pistonDropperDispenser0.put(2, 5); + pistonDropperDispenser0.put(11, 12); + pistonDropperDispenser0.put(10, 13); + pistonDropperDispenser0.put(12, 10); + + + + + HashMap repeaterComparatorDoorTripwire0 = new HashMap(); + + repeaterComparatorDoorTripwire0.put(0, 1); + repeaterComparatorDoorTripwire0.put(1, 2); + repeaterComparatorDoorTripwire0.put(2, 3); + repeaterComparatorDoorTripwire0.put(3, 0); + repeaterComparatorDoorTripwire0.put(4, 5); + repeaterComparatorDoorTripwire0.put(5, 6); + repeaterComparatorDoorTripwire0.put(6, 7); + repeaterComparatorDoorTripwire0.put(7, 4); + repeaterComparatorDoorTripwire0.put(8, 9); + repeaterComparatorDoorTripwire0.put(9, 10); + repeaterComparatorDoorTripwire0.put(10, 11); + repeaterComparatorDoorTripwire0.put(11, 8); + repeaterComparatorDoorTripwire0.put(12, 13); + repeaterComparatorDoorTripwire0.put(13, 14); + repeaterComparatorDoorTripwire0.put(14, 15); + repeaterComparatorDoorTripwire0.put(15, 12); + + + + HashMap> orientation1 = new HashMap>(); + + HashMap stairs1 = new HashMap(); + + stairs1.put(0, 1); + stairs1.put(1, 0); + stairs1.put(2, 3); + stairs1.put(3, 2); + stairs1.put(7, 6); + stairs1.put(6, 7); + stairs1.put(5, 4); + stairs1.put(4, 5); + + HashMap chestsLadders1 = new HashMap(); + + chestsLadders1.put(2, 3); + chestsLadders1.put(3, 2); + chestsLadders1.put(4, 5); + chestsLadders1.put(5, 4); + + HashMap vine1 = new HashMap(); + + vine1.put(1, 4); + vine1.put(2, 8); + vine1.put(4, 1); + vine1.put(8, 2); + + HashMap leverButtonTorch1 = new HashMap(); + + leverButtonTorch1.put(12, 9); + leverButtonTorch1.put(11, 10); + leverButtonTorch1.put(10, 12); + leverButtonTorch1.put(9, 11); + leverButtonTorch1.put(2, 4); + leverButtonTorch1.put(3, 2); + leverButtonTorch1.put(1, 3); + leverButtonTorch1.put(4, 1); + + HashMap pistonDropperDispenser1 = new HashMap(); + + pistonDropperDispenser1.put(12, 11); + pistonDropperDispenser1.put(11, 12); + pistonDropperDispenser1.put(10, 9); + pistonDropperDispenser1.put(9, 10); + pistonDropperDispenser1.put(2, 1); + pistonDropperDispenser1.put(3, 4); + pistonDropperDispenser1.put(1, 2); + pistonDropperDispenser1.put(4,3); + + + HashMap repeaterComparatorDoorTripwire1 = new HashMap(); + + repeaterComparatorDoorTripwire1.put(0, 2); + repeaterComparatorDoorTripwire1.put(1, 3); + repeaterComparatorDoorTripwire1.put(2, 0); + repeaterComparatorDoorTripwire1.put(3, 1); + repeaterComparatorDoorTripwire1.put(4, 6); + repeaterComparatorDoorTripwire1.put(5, 7); + repeaterComparatorDoorTripwire1.put(6, 4); + repeaterComparatorDoorTripwire1.put(7, 5); + repeaterComparatorDoorTripwire1.put(8, 10); + repeaterComparatorDoorTripwire1.put(9, 11); + repeaterComparatorDoorTripwire1.put(10, 8); + repeaterComparatorDoorTripwire1.put(11, 9); + repeaterComparatorDoorTripwire1.put(12, 14); + repeaterComparatorDoorTripwire1.put(13, 15); + repeaterComparatorDoorTripwire1.put(14, 12); + repeaterComparatorDoorTripwire1.put(15, 13); + + HashMap> orientation2 = new HashMap>(); + + HashMap stairs2 = new HashMap(); + + stairs2.put(2, 0); + stairs2.put(3, 1); + stairs2.put(1, 2); + stairs2.put(0, 3); + stairs2.put(4, 7); + stairs2.put(5, 6); + stairs2.put(7, 5); + stairs2.put(6, 4); + + HashMap chestsLadders2 = new HashMap(); + + chestsLadders2.put(2, 4); + chestsLadders2.put(3, 5); + chestsLadders2.put(4, 3); + chestsLadders2.put(5, 2); + + HashMap vine2 = new HashMap(); + + vine2.put(1, 8); + vine2.put(2, 1); + vine2.put(4, 2); + vine2.put(8, 4); + + HashMap leverButtonTorch2 = new HashMap(); + + leverButtonTorch2.put(9, 12); + leverButtonTorch2.put(10, 11); + leverButtonTorch2.put(12, 10); + leverButtonTorch2.put(11, 9); + leverButtonTorch2.put(4, 2); + leverButtonTorch2.put(2, 3); + leverButtonTorch2.put(3, 1); + leverButtonTorch2.put(1, 4); + + HashMap pistonDropperDispenser2 = new HashMap(); + + pistonDropperDispenser2.put(2, 4); + pistonDropperDispenser2.put(3, 5); + pistonDropperDispenser2.put(11, 13); + pistonDropperDispenser2.put(10, 12); + pistonDropperDispenser2.put(4, 3); + pistonDropperDispenser2.put(5, 2); + pistonDropperDispenser2.put(12, 11); + pistonDropperDispenser2.put(13,10); + + + HashMap repeaterComparatorDoorTripwire2 = new HashMap(); + + repeaterComparatorDoorTripwire2.put(1, 0); + repeaterComparatorDoorTripwire2.put(2, 1); + repeaterComparatorDoorTripwire2.put(3, 2); + repeaterComparatorDoorTripwire2.put(0, 3); + repeaterComparatorDoorTripwire2.put(5, 4); + repeaterComparatorDoorTripwire2.put(6, 5); + repeaterComparatorDoorTripwire2.put(7, 6); + repeaterComparatorDoorTripwire2.put(4, 7); + repeaterComparatorDoorTripwire2.put(9, 8); + repeaterComparatorDoorTripwire2.put(10, 9); + repeaterComparatorDoorTripwire2.put(11, 10); + repeaterComparatorDoorTripwire2.put(8, 11); + repeaterComparatorDoorTripwire2.put(13, 12); + repeaterComparatorDoorTripwire2.put(14, 13); + repeaterComparatorDoorTripwire2.put(15, 14); + repeaterComparatorDoorTripwire2.put(12, 15); + + + + + orientation0.put(Block.stairsBrick.blockID, stairs0); + orientation0.put(Block.stairsCobblestone.blockID, stairs0); + orientation0.put(Block.stairsNetherBrick.blockID, stairs0); + orientation0.put(Block.stairsNetherQuartz.blockID, stairs0); + orientation0.put(Block.stairsSandStone.blockID, stairs0); + orientation0.put(Block.stairsStoneBrick.blockID, stairs0); + orientation0.put(Block.stairsWoodBirch.blockID, stairs0); + orientation0.put(Block.stairsWoodJungle.blockID, stairs0); + orientation0.put(Block.stairsWoodOak.blockID, stairs0); + orientation0.put(Block.stairsWoodSpruce.blockID, stairs0); + orientation0.put(Block.stairsBrick.blockID, stairs0); + + orientation0.put(Block.chest.blockID, chestsLadders0); + orientation0.put(Block.chestTrapped.blockID, chestsLadders0); + orientation0.put(Block.ladder.blockID, chestsLadders0); + + orientation0.put(Block.lever.blockID, leverButtonTorch0); + orientation0.put(Block.stoneButton.blockID, leverButtonTorch0); + orientation0.put(Block.woodenButton.blockID, leverButtonTorch0); + orientation0.put(Block.torchRedstoneActive.blockID, leverButtonTorch0); + orientation0.put(Block.torchRedstoneIdle.blockID, leverButtonTorch0); + orientation0.put(Block.torchWood.blockID, leverButtonTorch0); + + orientation0.put(Block.pistonBase.blockID,pistonDropperDispenser0); + orientation0.put(Block.pistonExtension.blockID,pistonDropperDispenser0); + orientation0.put(Block.pistonMoving.blockID,pistonDropperDispenser0); + orientation0.put(Block.pistonStickyBase.blockID,pistonDropperDispenser0); + orientation0.put(Block.dropper.blockID,pistonDropperDispenser0); + orientation0.put(Block.dispenser.blockID,pistonDropperDispenser0); + + orientation0.put(Block.redstoneComparatorActive.blockID,pistonDropperDispenser0); + orientation0.put(Block.redstoneComparatorIdle.blockID,pistonDropperDispenser0); + orientation0.put(Block.redstoneRepeaterActive.blockID,pistonDropperDispenser0); + orientation0.put(Block.redstoneRepeaterIdle.blockID,pistonDropperDispenser0); + orientation0.put(Block.doorWood.blockID,pistonDropperDispenser0); + orientation0.put(Block.doorIron.blockID,pistonDropperDispenser0); + orientation0.put(Block.tripWireSource.blockID,pistonDropperDispenser0); + + + + + + orientation1.put(Block.stairsBrick.blockID, stairs1); + orientation1.put(Block.stairsCobblestone.blockID, stairs1); + orientation1.put(Block.stairsNetherBrick.blockID, stairs1); + orientation1.put(Block.stairsNetherQuartz.blockID, stairs1); + orientation1.put(Block.stairsSandStone.blockID, stairs1); + orientation1.put(Block.stairsStoneBrick.blockID, stairs1); + orientation1.put(Block.stairsWoodBirch.blockID, stairs1); + orientation1.put(Block.stairsWoodJungle.blockID, stairs1); + orientation1.put(Block.stairsWoodOak.blockID, stairs1); + orientation1.put(Block.stairsWoodSpruce.blockID, stairs1); + orientation1.put(Block.stairsBrick.blockID, stairs1); + + orientation1.put(Block.chest.blockID, chestsLadders1); + orientation1.put(Block.chestTrapped.blockID, chestsLadders1); + orientation1.put(Block.ladder.blockID, chestsLadders1); + + orientation1.put(Block.lever.blockID, leverButtonTorch1); + orientation1.put(Block.stoneButton.blockID, leverButtonTorch1); + orientation1.put(Block.woodenButton.blockID, leverButtonTorch1); + orientation1.put(Block.torchRedstoneActive.blockID, leverButtonTorch1); + orientation1.put(Block.torchRedstoneIdle.blockID, leverButtonTorch1); + orientation1.put(Block.torchWood.blockID, leverButtonTorch1); + + orientation1.put(Block.pistonBase.blockID,pistonDropperDispenser1); + orientation1.put(Block.pistonExtension.blockID,pistonDropperDispenser1); + orientation1.put(Block.pistonMoving.blockID,pistonDropperDispenser1); + orientation1.put(Block.pistonStickyBase.blockID,pistonDropperDispenser1); + orientation1.put(Block.dropper.blockID,pistonDropperDispenser1); + orientation1.put(Block.dispenser.blockID,pistonDropperDispenser1); + + orientation1.put(Block.redstoneComparatorActive.blockID,pistonDropperDispenser1); + orientation1.put(Block.redstoneComparatorIdle.blockID,pistonDropperDispenser1); + orientation1.put(Block.redstoneRepeaterActive.blockID,pistonDropperDispenser1); + orientation1.put(Block.redstoneRepeaterIdle.blockID,pistonDropperDispenser1); + orientation1.put(Block.doorWood.blockID,pistonDropperDispenser1); + orientation1.put(Block.doorIron.blockID,pistonDropperDispenser1); + orientation1.put(Block.tripWireSource.blockID,pistonDropperDispenser1); + + + + + + + orientation2.put(Block.stairsBrick.blockID, stairs2); + orientation2.put(Block.stairsCobblestone.blockID, stairs2); + orientation2.put(Block.stairsNetherBrick.blockID, stairs2); + orientation2.put(Block.stairsNetherQuartz.blockID, stairs2); + orientation2.put(Block.stairsSandStone.blockID, stairs2); + orientation2.put(Block.stairsStoneBrick.blockID, stairs2); + orientation2.put(Block.stairsWoodBirch.blockID, stairs2); + orientation2.put(Block.stairsWoodJungle.blockID, stairs2); + orientation2.put(Block.stairsWoodOak.blockID, stairs2); + orientation2.put(Block.stairsWoodSpruce.blockID, stairs2); + orientation2.put(Block.stairsBrick.blockID, stairs2); + + orientation2.put(Block.chest.blockID, chestsLadders2); + orientation2.put(Block.chestTrapped.blockID, chestsLadders2); + orientation2.put(Block.ladder.blockID, chestsLadders2); + + orientation2.put(Block.lever.blockID, leverButtonTorch2); + orientation2.put(Block.stoneButton.blockID, leverButtonTorch2); + orientation2.put(Block.woodenButton.blockID, leverButtonTorch2); + orientation2.put(Block.torchRedstoneActive.blockID, leverButtonTorch2); + orientation2.put(Block.torchRedstoneIdle.blockID, leverButtonTorch2); + orientation2.put(Block.torchWood.blockID, leverButtonTorch2); + + orientation2.put(Block.pistonBase.blockID,pistonDropperDispenser2); + orientation2.put(Block.pistonExtension.blockID,pistonDropperDispenser2); + orientation2.put(Block.pistonMoving.blockID,pistonDropperDispenser2); + orientation2.put(Block.pistonStickyBase.blockID,pistonDropperDispenser2); + orientation2.put(Block.dropper.blockID,pistonDropperDispenser2); + orientation2.put(Block.dispenser.blockID,pistonDropperDispenser2); + + orientation2.put(Block.redstoneComparatorActive.blockID,pistonDropperDispenser2); + orientation2.put(Block.redstoneComparatorIdle.blockID,pistonDropperDispenser2); + orientation2.put(Block.redstoneRepeaterActive.blockID,pistonDropperDispenser2); + orientation2.put(Block.redstoneRepeaterIdle.blockID,pistonDropperDispenser2); + orientation2.put(Block.doorWood.blockID,pistonDropperDispenser2); + orientation2.put(Block.doorIron.blockID,pistonDropperDispenser2); + orientation2.put(Block.tripWireSource.blockID,pistonDropperDispenser2); + + this.rotationMappings.put(2, orientation2); + this.rotationMappings.put(1, orientation1); + this.rotationMappings.put(0, orientation0); + + + } + + public int getRotatedBlock(int metaData, int desiredOrientation, int blockID) + { + if(this.rotationMappings.containsKey(desiredOrientation)) + { + if(this.rotationMappings.get(desiredOrientation).containsKey(blockID)) + { + if(this.rotationMappings.get(desiredOrientation).get(blockID).containsKey(metaData)) + { + return this.rotationMappings.get(desiredOrientation).get(blockID).get(metaData); + } + } + } + + return 0 ; + } + + + +} \ No newline at end of file From b1e18b564ee0c459434556245cfd152e1c3723e3 Mon Sep 17 00:00:00 2001 From: StevenRS11 Date: Wed, 26 Jun 2013 22:28:57 -0400 Subject: [PATCH 2/2] Made it prettier --- .../helpers/BlockRotationHelper.java | 84 ++++++------------- 1 file changed, 24 insertions(+), 60 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/helpers/BlockRotationHelper.java b/StevenDimDoors/mod_pocketDim/helpers/BlockRotationHelper.java index 672c64bb..728b7244 100644 --- a/StevenDimDoors/mod_pocketDim/helpers/BlockRotationHelper.java +++ b/StevenDimDoors/mod_pocketDim/helpers/BlockRotationHelper.java @@ -13,8 +13,6 @@ public class BlockRotationHelper this.InitializeRotationMap(); } - - public void InitializeRotationMap() { HashMap> orientation0 = new HashMap>(); @@ -29,29 +27,22 @@ public class BlockRotationHelper stairs0.put(6, 5); stairs0.put(5, 7); stairs0.put(4, 6); - - - - HashMap chestsLadders0 = new HashMap(); + HashMap chestsLadders0 = new HashMap(); chestsLadders0.put(2, 5); chestsLadders0.put(3, 4); chestsLadders0.put(4, 2); chestsLadders0.put(5, 3); - - - - HashMap vine0 = new HashMap(); + + HashMap vine0 = new HashMap(); vine0.put(1, 2); vine0.put(2, 4); vine0.put(4, 8); vine0.put(8, 1); - orientation0.put(Block.vine.blockID, vine0); - - HashMap leverButtonTorch0 = new HashMap(); + HashMap leverButtonTorch0 = new HashMap(); leverButtonTorch0.put(12, 9); leverButtonTorch0.put(11, 10); @@ -62,9 +53,7 @@ public class BlockRotationHelper leverButtonTorch0.put(1, 3); leverButtonTorch0.put(4, 1); - - - HashMap pistonDropperDispenser0 = new HashMap(); + HashMap pistonDropperDispenser0 = new HashMap(); pistonDropperDispenser0.put(4, 2); pistonDropperDispenser0.put(5, 3); @@ -74,11 +63,8 @@ public class BlockRotationHelper pistonDropperDispenser0.put(11, 12); pistonDropperDispenser0.put(10, 13); pistonDropperDispenser0.put(12, 10); - - - - - HashMap repeaterComparatorDoorTripwire0 = new HashMap(); + + HashMap repeaterComparatorDoorTripwire0 = new HashMap(); repeaterComparatorDoorTripwire0.put(0, 1); repeaterComparatorDoorTripwire0.put(1, 2); @@ -97,11 +83,9 @@ public class BlockRotationHelper repeaterComparatorDoorTripwire0.put(14, 15); repeaterComparatorDoorTripwire0.put(15, 12); - - HashMap> orientation1 = new HashMap>(); - HashMap stairs1 = new HashMap(); + HashMap stairs1 = new HashMap(); stairs1.put(0, 1); stairs1.put(1, 0); @@ -112,21 +96,21 @@ public class BlockRotationHelper stairs1.put(5, 4); stairs1.put(4, 5); - HashMap chestsLadders1 = new HashMap(); + HashMap chestsLadders1 = new HashMap(); chestsLadders1.put(2, 3); chestsLadders1.put(3, 2); chestsLadders1.put(4, 5); chestsLadders1.put(5, 4); - HashMap vine1 = new HashMap(); + HashMap vine1 = new HashMap(); vine1.put(1, 4); vine1.put(2, 8); vine1.put(4, 1); vine1.put(8, 2); - HashMap leverButtonTorch1 = new HashMap(); + HashMap leverButtonTorch1 = new HashMap(); leverButtonTorch1.put(12, 9); leverButtonTorch1.put(11, 10); @@ -137,7 +121,7 @@ public class BlockRotationHelper leverButtonTorch1.put(1, 3); leverButtonTorch1.put(4, 1); - HashMap pistonDropperDispenser1 = new HashMap(); + HashMap pistonDropperDispenser1 = new HashMap(); pistonDropperDispenser1.put(12, 11); pistonDropperDispenser1.put(11, 12); @@ -149,7 +133,7 @@ public class BlockRotationHelper pistonDropperDispenser1.put(4,3); - HashMap repeaterComparatorDoorTripwire1 = new HashMap(); + HashMap repeaterComparatorDoorTripwire1 = new HashMap(); repeaterComparatorDoorTripwire1.put(0, 2); repeaterComparatorDoorTripwire1.put(1, 3); @@ -170,7 +154,7 @@ public class BlockRotationHelper HashMap> orientation2 = new HashMap>(); - HashMap stairs2 = new HashMap(); + HashMap stairs2 = new HashMap(); stairs2.put(2, 0); stairs2.put(3, 1); @@ -181,21 +165,21 @@ public class BlockRotationHelper stairs2.put(7, 5); stairs2.put(6, 4); - HashMap chestsLadders2 = new HashMap(); + HashMap chestsLadders2 = new HashMap(); chestsLadders2.put(2, 4); chestsLadders2.put(3, 5); chestsLadders2.put(4, 3); chestsLadders2.put(5, 2); - HashMap vine2 = new HashMap(); + HashMap vine2 = new HashMap(); vine2.put(1, 8); vine2.put(2, 1); vine2.put(4, 2); vine2.put(8, 4); - HashMap leverButtonTorch2 = new HashMap(); + HashMap leverButtonTorch2 = new HashMap(); leverButtonTorch2.put(9, 12); leverButtonTorch2.put(10, 11); @@ -206,7 +190,7 @@ public class BlockRotationHelper leverButtonTorch2.put(3, 1); leverButtonTorch2.put(1, 4); - HashMap pistonDropperDispenser2 = new HashMap(); + HashMap pistonDropperDispenser2 = new HashMap(); pistonDropperDispenser2.put(2, 4); pistonDropperDispenser2.put(3, 5); @@ -218,7 +202,7 @@ public class BlockRotationHelper pistonDropperDispenser2.put(13,10); - HashMap repeaterComparatorDoorTripwire2 = new HashMap(); + HashMap repeaterComparatorDoorTripwire2 = new HashMap(); repeaterComparatorDoorTripwire2.put(1, 0); repeaterComparatorDoorTripwire2.put(2, 1); @@ -251,25 +235,22 @@ public class BlockRotationHelper orientation0.put(Block.stairsWoodOak.blockID, stairs0); orientation0.put(Block.stairsWoodSpruce.blockID, stairs0); orientation0.put(Block.stairsBrick.blockID, stairs0); - + orientation0.put(Block.vine.blockID, vine0); orientation0.put(Block.chest.blockID, chestsLadders0); orientation0.put(Block.chestTrapped.blockID, chestsLadders0); orientation0.put(Block.ladder.blockID, chestsLadders0); - orientation0.put(Block.lever.blockID, leverButtonTorch0); orientation0.put(Block.stoneButton.blockID, leverButtonTorch0); orientation0.put(Block.woodenButton.blockID, leverButtonTorch0); orientation0.put(Block.torchRedstoneActive.blockID, leverButtonTorch0); orientation0.put(Block.torchRedstoneIdle.blockID, leverButtonTorch0); orientation0.put(Block.torchWood.blockID, leverButtonTorch0); - orientation0.put(Block.pistonBase.blockID,pistonDropperDispenser0); orientation0.put(Block.pistonExtension.blockID,pistonDropperDispenser0); orientation0.put(Block.pistonMoving.blockID,pistonDropperDispenser0); orientation0.put(Block.pistonStickyBase.blockID,pistonDropperDispenser0); orientation0.put(Block.dropper.blockID,pistonDropperDispenser0); orientation0.put(Block.dispenser.blockID,pistonDropperDispenser0); - orientation0.put(Block.redstoneComparatorActive.blockID,pistonDropperDispenser0); orientation0.put(Block.redstoneComparatorIdle.blockID,pistonDropperDispenser0); orientation0.put(Block.redstoneRepeaterActive.blockID,pistonDropperDispenser0); @@ -278,10 +259,6 @@ public class BlockRotationHelper orientation0.put(Block.doorIron.blockID,pistonDropperDispenser0); orientation0.put(Block.tripWireSource.blockID,pistonDropperDispenser0); - - - - orientation1.put(Block.stairsBrick.blockID, stairs1); orientation1.put(Block.stairsCobblestone.blockID, stairs1); orientation1.put(Block.stairsNetherBrick.blockID, stairs1); @@ -293,25 +270,22 @@ public class BlockRotationHelper orientation1.put(Block.stairsWoodOak.blockID, stairs1); orientation1.put(Block.stairsWoodSpruce.blockID, stairs1); orientation1.put(Block.stairsBrick.blockID, stairs1); - + orientation1.put(Block.vine.blockID, vine1); orientation1.put(Block.chest.blockID, chestsLadders1); orientation1.put(Block.chestTrapped.blockID, chestsLadders1); orientation1.put(Block.ladder.blockID, chestsLadders1); - orientation1.put(Block.lever.blockID, leverButtonTorch1); orientation1.put(Block.stoneButton.blockID, leverButtonTorch1); orientation1.put(Block.woodenButton.blockID, leverButtonTorch1); orientation1.put(Block.torchRedstoneActive.blockID, leverButtonTorch1); orientation1.put(Block.torchRedstoneIdle.blockID, leverButtonTorch1); orientation1.put(Block.torchWood.blockID, leverButtonTorch1); - orientation1.put(Block.pistonBase.blockID,pistonDropperDispenser1); orientation1.put(Block.pistonExtension.blockID,pistonDropperDispenser1); orientation1.put(Block.pistonMoving.blockID,pistonDropperDispenser1); orientation1.put(Block.pistonStickyBase.blockID,pistonDropperDispenser1); orientation1.put(Block.dropper.blockID,pistonDropperDispenser1); orientation1.put(Block.dispenser.blockID,pistonDropperDispenser1); - orientation1.put(Block.redstoneComparatorActive.blockID,pistonDropperDispenser1); orientation1.put(Block.redstoneComparatorIdle.blockID,pistonDropperDispenser1); orientation1.put(Block.redstoneRepeaterActive.blockID,pistonDropperDispenser1); @@ -320,11 +294,7 @@ public class BlockRotationHelper orientation1.put(Block.doorIron.blockID,pistonDropperDispenser1); orientation1.put(Block.tripWireSource.blockID,pistonDropperDispenser1); - - - - - + orientation2.put(Block.stairsBrick.blockID, stairs2); orientation2.put(Block.stairsCobblestone.blockID, stairs2); orientation2.put(Block.stairsNetherBrick.blockID, stairs2); @@ -336,25 +306,22 @@ public class BlockRotationHelper orientation2.put(Block.stairsWoodOak.blockID, stairs2); orientation2.put(Block.stairsWoodSpruce.blockID, stairs2); orientation2.put(Block.stairsBrick.blockID, stairs2); - + orientation2.put(Block.vine.blockID, vine2); orientation2.put(Block.chest.blockID, chestsLadders2); orientation2.put(Block.chestTrapped.blockID, chestsLadders2); orientation2.put(Block.ladder.blockID, chestsLadders2); - orientation2.put(Block.lever.blockID, leverButtonTorch2); orientation2.put(Block.stoneButton.blockID, leverButtonTorch2); orientation2.put(Block.woodenButton.blockID, leverButtonTorch2); orientation2.put(Block.torchRedstoneActive.blockID, leverButtonTorch2); orientation2.put(Block.torchRedstoneIdle.blockID, leverButtonTorch2); orientation2.put(Block.torchWood.blockID, leverButtonTorch2); - orientation2.put(Block.pistonBase.blockID,pistonDropperDispenser2); orientation2.put(Block.pistonExtension.blockID,pistonDropperDispenser2); orientation2.put(Block.pistonMoving.blockID,pistonDropperDispenser2); orientation2.put(Block.pistonStickyBase.blockID,pistonDropperDispenser2); orientation2.put(Block.dropper.blockID,pistonDropperDispenser2); orientation2.put(Block.dispenser.blockID,pistonDropperDispenser2); - orientation2.put(Block.redstoneComparatorActive.blockID,pistonDropperDispenser2); orientation2.put(Block.redstoneComparatorIdle.blockID,pistonDropperDispenser2); orientation2.put(Block.redstoneRepeaterActive.blockID,pistonDropperDispenser2); @@ -366,8 +333,6 @@ public class BlockRotationHelper this.rotationMappings.put(2, orientation2); this.rotationMappings.put(1, orientation1); this.rotationMappings.put(0, orientation0); - - } public int getRotatedBlock(int metaData, int desiredOrientation, int blockID) @@ -382,8 +347,7 @@ public class BlockRotationHelper } } } - - return 0 ; + return 0 ; }