mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-14 12:57:55 +00:00
Fix NPE in EarthSmash
This commit is contained in:
parent
091f381def
commit
4ba58e6072
1 changed files with 3 additions and 0 deletions
|
@ -503,6 +503,9 @@ public class EarthSmash {
|
|||
for (EarthSmash smash : instances) {
|
||||
if (reqState == null || smash.state == reqState)
|
||||
for (Block block : blocks) {
|
||||
if (block == null || smash.loc == null) {
|
||||
continue;
|
||||
}
|
||||
if (block.getLocation().getWorld() == smash.loc.getWorld() && block.getLocation().distanceSquared(smash.loc) <= Math.pow(2.5, 2))
|
||||
return smash;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue