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,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue