mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
Update HorizontalVelocityTracker.java
This commit is contained in:
parent
045311e44c
commit
b0b752dfbe
1 changed files with 6 additions and 4 deletions
|
@ -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())
|
||||||
|
|
Loading…
Reference in a new issue