mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-17 07:37:17 +00:00
You should be able to redirect your own WaterManip
This commit is contained in:
parent
72dfbb7f10
commit
2cae7a0298
|
@ -484,11 +484,34 @@ public class WaterManipulation {
|
|||
public static void moveWater(Player player) {
|
||||
if (cooldowns.containsKey(player.getName())) {
|
||||
if (cooldowns.get(player.getName()) + cooldown >= System.currentTimeMillis()) {
|
||||
return;
|
||||
} else {
|
||||
cooldowns.remove(player.getName());
|
||||
if (prepared.containsKey(player)) {
|
||||
if (instances.containsKey(prepared.get(player))) {
|
||||
instances.get(prepared.get(player)).moveWater();
|
||||
}
|
||||
prepared.remove(player);
|
||||
} else if (WaterReturn.hasWaterBottle(player)) {
|
||||
Location eyeloc = player.getEyeLocation();
|
||||
Block block = eyeloc.add(eyeloc.getDirection().normalize()).getBlock();
|
||||
if (Methods.isTransparentToEarthbending(player, block)
|
||||
&& Methods.isTransparentToEarthbending(player, eyeloc.getBlock())) {
|
||||
|
||||
if (getTargetLocation(player).distance(block.getLocation()) > 1) {
|
||||
block.setType(Material.WATER);
|
||||
block.setData(full);
|
||||
WaterManipulation watermanip = new WaterManipulation(player);
|
||||
watermanip.moveWater();
|
||||
if (!watermanip.progressing) {
|
||||
block.setType(Material.AIR);
|
||||
} else {
|
||||
WaterReturn.emptyWaterBottle(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
if (prepared.containsKey(player)) {
|
||||
if (instances.containsKey(prepared.get(player))) {
|
||||
|
@ -514,6 +537,7 @@ public class WaterManipulation {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
redirectTargettedBlasts(player);
|
||||
|
|
Loading…
Reference in a new issue