EarthGrab fixes (#712)

This commit is contained in:
Sobki 2017-01-28 09:03:13 +10:00 committed by Christopher Martin
parent 047224a4cb
commit 4743fdc829

View file

@ -50,6 +50,8 @@ public class EarthGrab extends EarthAbility {
if (!bPlayer.canBend(this)) {
return;
} else if (player.getLocation().clone().add(0, -1, 0).getBlock().getType().isTransparent()) {
return;
}
if (bPlayer.isAvatarState()) {
@ -217,8 +219,13 @@ public class EarthGrab extends EarthAbility {
remove();
return;
}
if (blockType == null) {
return;
} else if (blockByte == null) {
return;
}
ParticleEffect.BLOCK_CRACK.display((ParticleEffect.ParticleData) new ParticleEffect.BlockData(blockType, blockByte), 1F, 0.1F, 1F, 0.1F, 100, loc.add(0, -1, 0), 500);
for (Entity e : GeneralMethods.getEntitiesAroundPoint(loc, 2.5)) {
if (e.getEntityId() != player.getEntityId() && e instanceof LivingEntity) {
closestEntity = e;