From 5810b0b504659613781228c0525ae4fbe30aac01 Mon Sep 17 00:00:00 2001 From: nathank33 Date: Wed, 3 Sep 2014 20:21:17 -0700 Subject: [PATCH] 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. --- .../projectkorra/ProjectKorra/firebending/Extinguish.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/projectkorra/ProjectKorra/firebending/Extinguish.java b/src/com/projectkorra/ProjectKorra/firebending/Extinguish.java index ce1b6553..d24e65d1 100644 --- a/src/com/projectkorra/ProjectKorra/firebending/Extinguish.java +++ b/src/com/projectkorra/ProjectKorra/firebending/Extinguish.java @@ -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;