diff --git a/src/com/projectkorra/projectkorra/earthbending/CompactColumn.java b/src/com/projectkorra/projectkorra/earthbending/CompactColumn.java index 1f5a2bf9..09b05069 100644 --- a/src/com/projectkorra/projectkorra/earthbending/CompactColumn.java +++ b/src/com/projectkorra/projectkorra/earthbending/CompactColumn.java @@ -77,9 +77,6 @@ public class CompactColumn { if (distance != 0) { if (canInstantiate()) { - for (Block blocki : affectedblocks.keySet()) { - EarthColumn.resetBlock(blocki); - } id = ID; instances.put(id, this); if (ID >= Integer.MAX_VALUE) { @@ -144,9 +141,6 @@ public class CompactColumn { if (System.currentTimeMillis() - time >= interval) { time = System.currentTimeMillis(); if (!moveEarth()) { - for (Block blocki : affectedblocks.keySet()) { - EarthColumn.resetBlock(blocki); - } instances.remove(id); // for (Block block : affectedblocks.keySet()) { // alreadydoneblocks.put(block, block); diff --git a/src/com/projectkorra/projectkorra/earthbending/EarthColumn.java b/src/com/projectkorra/projectkorra/earthbending/EarthColumn.java index aab80d61..70b95669 100644 --- a/src/com/projectkorra/projectkorra/earthbending/EarthColumn.java +++ b/src/com/projectkorra/projectkorra/earthbending/EarthColumn.java @@ -8,6 +8,7 @@ import com.projectkorra.projectkorra.util.BlockSource; import com.projectkorra.projectkorra.util.ClickType; import org.bukkit.Location; +import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.util.Vector; @@ -17,8 +18,6 @@ import java.util.concurrent.ConcurrentHashMap; public class EarthColumn { public static ConcurrentHashMap instances = new ConcurrentHashMap(); - private static ConcurrentHashMap alreadydoneblocks = new ConcurrentHashMap(); - private static ConcurrentHashMap baseblocks = new ConcurrentHashMap(); public static final int standardheight = ProjectKorra.plugin.getConfig().getInt("Abilities.Earth.RaiseEarth.Column.Height"); private static int ID = Integer.MIN_VALUE; @@ -158,7 +157,7 @@ public class EarthColumn { private boolean canInstantiate() { for (Block block : affectedblocks.keySet()) { - if (blockInAllAffectedBlocks(block) || alreadydoneblocks.containsKey(block)) { + if (blockInAllAffectedBlocks(block) || block.getType()==Material.AIR) { return false; } } @@ -176,10 +175,6 @@ public class EarthColumn { time = System.currentTimeMillis(); if (!moveEarth()) { instances.remove(id); - for (Block block : affectedblocks.keySet()) { - alreadydoneblocks.put(block, block); - } - baseblocks.put(location.clone().add(direction.clone().multiply(-1 * (distance - 1))).getBlock(), (distance - 1)); return false; } @@ -200,34 +195,12 @@ public class EarthColumn { return true; } - public static boolean blockIsBase(Block block) { - if (baseblocks.containsKey(block)) { - return true; - } - return false; - } - - public static void removeBlockBase(Block block) { - if (baseblocks.containsKey(block)) { - baseblocks.remove(block); - } - - } - public static void removeAll() { for (int id : instances.keySet()) { instances.remove(id); } } - public static void resetBlock(Block block) { - - if (alreadydoneblocks.containsKey(block)) { - alreadydoneblocks.remove(block); - } - - } - public static String getDescription() { return "To use, simply left-click on an earthbendable block. " + "A column of earth will shoot upwards from that location. " + "Anything in the way of the column will be brought up with it, " + "leaving talented benders the ability to trap brainless entities up there. " + "Additionally, simply sneak (default shift) looking at an earthbendable block. " + "A wall of earth will shoot upwards from that location. " + "Anything in the way of the wall will be brought up with it. "; } diff --git a/src/com/projectkorra/projectkorra/earthbending/EarthMethods.java b/src/com/projectkorra/projectkorra/earthbending/EarthMethods.java index f5a36639..7c3ace00 100644 --- a/src/com/projectkorra/projectkorra/earthbending/EarthMethods.java +++ b/src/com/projectkorra/projectkorra/earthbending/EarthMethods.java @@ -535,8 +535,6 @@ public class EarthMethods { if (EarthColumn.blockInAllAffectedBlocks(block)) EarthColumn.revertBlock(block); - EarthColumn.resetBlock(block); - movedearth.remove(block); } } @@ -587,8 +585,6 @@ public class EarthMethods { EarthColumn.revertBlock(sourceblock); if (EarthColumn.blockInAllAffectedBlocks(block)) EarthColumn.revertBlock(block); - EarthColumn.resetBlock(sourceblock); - EarthColumn.resetBlock(block); movedearth.remove(block); return true; } @@ -616,8 +612,6 @@ public class EarthMethods { EarthColumn.revertBlock(sourceblock); if (EarthColumn.blockInAllAffectedBlocks(block)) EarthColumn.revertBlock(block); - EarthColumn.resetBlock(sourceblock); - EarthColumn.resetBlock(block); movedearth.remove(block); } return true; diff --git a/test/server/plugins/ProjectKorra.jar b/test/server/plugins/ProjectKorra.jar index 01d46510..bc72f3f7 100644 Binary files a/test/server/plugins/ProjectKorra.jar and b/test/server/plugins/ProjectKorra.jar differ