mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-11-01 09:59:18 +00:00
null checks for tempblocks in surge remove water
This commit is contained in:
parent
76c86bce37
commit
aa6bf5a849
|
@ -352,7 +352,9 @@ public class SurgeWall extends WaterAbility {
|
|||
if (!GeneralMethods.isAdjacentToThreeOrMoreSources(block)) {
|
||||
if (this.oldTemps.containsKey(block)) {
|
||||
final TempBlock tb = TempBlock.get(block);
|
||||
tb.setType(this.oldTemps.get(block));
|
||||
if (tb != null) {
|
||||
tb.setType(this.oldTemps.get(block));
|
||||
}
|
||||
} else {
|
||||
TempBlock.revertBlock(block, Material.AIR);
|
||||
}
|
||||
|
@ -367,7 +369,9 @@ public class SurgeWall extends WaterAbility {
|
|||
if (AFFECTED_BLOCKS.containsKey(block)) {
|
||||
if (this.oldTemps.containsKey(block)) {
|
||||
final TempBlock tb = TempBlock.get(block);
|
||||
tb.setType(this.oldTemps.get(block));
|
||||
if (tb != null) {
|
||||
tb.setType(this.oldTemps.get(block));
|
||||
}
|
||||
} else {
|
||||
TempBlock.revertBlock(block, Material.AIR);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue