mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-10-31 17:29:25 +00:00
Remove revertBlock recursive calls in EarthAbility and Collapse (#1023)
## Fixes * Fixes recursive calls to `EarthAbility#revertBlock(Block)`
This commit is contained in:
parent
861f0055d5
commit
0f2940f5eb
|
@ -604,10 +604,10 @@ public abstract class EarthAbility extends ElementalAbility {
|
|||
if (block.equals(sourceblock)) {
|
||||
info.getState().update(true, false);
|
||||
if (RaiseEarth.blockInAllAffectedBlocks(sourceblock)) {
|
||||
EarthAbility.revertBlock(sourceblock);
|
||||
RaiseEarth.revertAffectedBlock(sourceblock);
|
||||
}
|
||||
if (RaiseEarth.blockInAllAffectedBlocks(block)) {
|
||||
EarthAbility.revertBlock(block);
|
||||
RaiseEarth.revertAffectedBlock(block);
|
||||
}
|
||||
MOVED_EARTH.remove(block);
|
||||
return true;
|
||||
|
@ -636,10 +636,10 @@ public abstract class EarthAbility extends ElementalAbility {
|
|||
}
|
||||
|
||||
if (RaiseEarth.blockInAllAffectedBlocks(sourceblock)) {
|
||||
EarthAbility.revertBlock(sourceblock);
|
||||
RaiseEarth.revertAffectedBlock(sourceblock);
|
||||
}
|
||||
if (RaiseEarth.blockInAllAffectedBlocks(block)) {
|
||||
EarthAbility.revertBlock(block);
|
||||
RaiseEarth.revertAffectedBlock(block);
|
||||
}
|
||||
MOVED_EARTH.remove(block);
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public class Collapse extends EarthAbility {
|
|||
thisBlock = this.block.getWorld().getBlockAt(this.location.clone().add(this.direction.clone().multiply(-i)));
|
||||
this.affectedBlocks.put(thisBlock, thisBlock);
|
||||
if (RaiseEarth.blockInAllAffectedBlocks(thisBlock)) {
|
||||
EarthAbility.revertBlock(thisBlock);
|
||||
RaiseEarth.revertAffectedBlock(thisBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue