Improved HeatControl Efficiency

HeatControl now checks the type of the block before it calls
isRegionProtectedFromBuild. Due to the large amount of blocks being
processed, having this extra step saves us from having to call
factions/griefprotection/etc for every block.
This commit is contained in:
nathank33 2014-09-03 20:21:17 -07:00
parent 7d4eb874b2
commit 5810b0b504

View file

@ -31,6 +31,12 @@ public class Extinguish {
double radius = Methods.getFirebendingDayAugment(defaultradius, player.getWorld());
for (Block block : Methods.getBlocksAroundPoint(
player.getTargetBlock(null, (int) range).getLocation(), radius)) {
Material mat = block.getType();
if(mat != Material.FIRE
&& mat != Material.STATIONARY_LAVA
&& mat != Material.LAVA)
continue;
if (Methods.isRegionProtectedFromBuild(player, "Blaze",
block.getLocation()))
continue;