LavaFlow Cleanup Fix

LavaFlow blocks were flooding which was causing obsidian and stone to
arise when it shouldn't. I made LavaFlow blocks TempBlocks and changed
the isLavaBendable() method so that LavaSurge will still work with
LavaFlow.
This commit is contained in:
nathank33 2014-09-06 09:48:41 -07:00
parent 2ad44f6a78
commit 80696816d4
2 changed files with 12 additions and 6 deletions

View file

@ -89,6 +89,7 @@ import com.projectkorra.ProjectKorra.earthbending.EarthBlast;
import com.projectkorra.ProjectKorra.earthbending.EarthColumn;
import com.projectkorra.ProjectKorra.earthbending.EarthPassive;
import com.projectkorra.ProjectKorra.earthbending.EarthTunnel;
import com.projectkorra.ProjectKorra.earthbending.LavaFlow;
import com.projectkorra.ProjectKorra.earthbending.Shockwave;
import com.projectkorra.ProjectKorra.earthbending.Tremorsense;
import com.projectkorra.ProjectKorra.firebending.Cook;
@ -1360,8 +1361,13 @@ public class Methods {
public static boolean isLavabendable(Block block, Player player) {
byte full = 0x0;
if (TempBlock.isTempBlock(block)) return false;
if ((block.getType() == Material.LAVA || block.getType() == Material.STATIONARY_LAVA) && block.getData() == full) return true;
if (TempBlock.isTempBlock(block)){
TempBlock tblock = TempBlock.instances.get(block);
if(tblock == null || !LavaFlow.totalBlocks.contains(tblock))
return false;
}
if ((block.getType() == Material.LAVA || block.getType() == Material.STATIONARY_LAVA) && block.getData() == full)
return true;
return false;
}

View file

@ -48,8 +48,8 @@ public class LavaFlow
public static double AS_SHIFT_PLATFORM_RADIUS = 3;
public static double AS_SHIFT_MAX_RADIUS = 16;
public static double AS_SHIFT_FLOW_SPEED = 0.2;
public static long AS_SHIFT_REMOVE_SPEED = 6000;
public static double AS_SHIFT_REMOVE_DELAY = 12000;
public static double AS_SHIFT_REMOVE_SPEED = 6.0;
public static long AS_SHIFT_REMOVE_DELAY = 12000;
public static double AS_CLICK_RANGE = 15.0;
public static double AS_CLICK_RADIUS = 8.0;
public static long AS_CLICK_LAVA_DELAY = 2000;
@ -301,7 +301,7 @@ public class LavaFlow
* melting over plants by creating new Plantbending() objects.
* It also appends the TempBlock to our arraylist called totalBlocks.
*
* NOTE: Due to LavaSurge's check on TempBlocks we have to remove
* NOTE: (DISABLED) Due to LavaSurge's check on TempBlocks we have to remove
* our tempblocks from TempBlock.instances so that players will
* be able to LavaSurge our blocks.
*/
@ -319,7 +319,7 @@ public class LavaFlow
TempBlock tblock = new TempBlock(block,Material.STATIONARY_LAVA,(byte) 0);
totalBlocks.add(tblock);
affectedBlocks.add(tblock);
TempBlock.instances.remove(block);
//TempBlock.instances.remove(block);
}
}
public void removeLava(Block testBlock)