Update HorizontalVelocityTracker.java

This commit is contained in:
Simplicitee 2015-11-06 13:00:30 -05:00
parent 045311e44c
commit b0b752dfbe

View file

@ -72,10 +72,12 @@ public class HorizontalVelocityTracker {
if ((diff.getX() > 1 || diff.getX() < -1) || (diff.getZ() > 1 || diff.getZ() < -1)) {
impactLocation = entity.getLocation();
for (Block b : blocks) {
if (!EarthMethods.isTransparentToEarthbending(instigator, b)) {
ProjectKorra.plugin.getServer().getPluginManager().callEvent(new HorizontalVelocityChangeEvent(entity, instigator, lastVelocity, thisVelocity, diff, launchLocation, impactLocation));
remove();
return;
if (GeneralMethods.isSolid(b) && (entity.getLocation().getBlock().getRelative(BlockFace.EAST) == b || entity.getLocation().getBlock().getRelative(BlockFace.NORTH) == b || entity.getLocation().getBlock().getRelative(BlockFace.WEST) == b || entity.getLocation().getBlock().getRelative(BlockFace.SOUTH) == b)) {
if (!EarthMethods.isTransparentToEarthbending(instigator, b)) {
ProjectKorra.plugin.getServer().getPluginManager().callEvent(new HorizontalVelocityChangeEvent(entity, instigator, lastVelocity, thisVelocity, diff, launchLocation, impactLocation));
remove();
return;
}
}
}
}