Update HorizontalVelocityTracker.java

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

View file

@ -72,6 +72,7 @@ public class HorizontalVelocityTracker {
if ((diff.getX() > 1 || diff.getX() < -1) || (diff.getZ() > 1 || diff.getZ() < -1)) { if ((diff.getX() > 1 || diff.getX() < -1) || (diff.getZ() > 1 || diff.getZ() < -1)) {
impactLocation = entity.getLocation(); impactLocation = entity.getLocation();
for (Block b : blocks) { for (Block b : blocks) {
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)) { if (!EarthMethods.isTransparentToEarthbending(instigator, b)) {
ProjectKorra.plugin.getServer().getPluginManager().callEvent(new HorizontalVelocityChangeEvent(entity, instigator, lastVelocity, thisVelocity, diff, launchLocation, impactLocation)); ProjectKorra.plugin.getServer().getPluginManager().callEvent(new HorizontalVelocityChangeEvent(entity, instigator, lastVelocity, thisVelocity, diff, launchLocation, impactLocation));
remove(); remove();
@ -81,6 +82,7 @@ public class HorizontalVelocityTracker {
} }
} }
} }
}
public static void updateAll() { public static void updateAll() {
for (Entity e : instances.keySet()) for (Entity e : instances.keySet())