mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
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:
parent
7d4eb874b2
commit
5810b0b504
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue