mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Fixed torrent temp flooding and IceWave cooldown.
* Fixed torrent temp flooding. * Fixed IceWave cooldown.
This commit is contained in:
parent
ba05e47118
commit
db61b0d979
3 changed files with 29 additions and 26 deletions
|
@ -483,8 +483,10 @@ public class Torrent extends WaterAbility {
|
||||||
Location eyeLoc = player.getEyeLocation();
|
Location eyeLoc = player.getEyeLocation();
|
||||||
Block block = eyeLoc.add(eyeLoc.getDirection().normalize()).getBlock();
|
Block block = eyeLoc.add(eyeLoc.getDirection().normalize()).getBlock();
|
||||||
if (isTransparent(player, block) && isTransparent(player, eyeLoc.getBlock())) {
|
if (isTransparent(player, block) && isTransparent(player, eyeLoc.getBlock())) {
|
||||||
block.setType(Material.WATER);
|
if(block.getType() != Material.WATER) {
|
||||||
|
block.setType(Material.STATIONARY_WATER);
|
||||||
block.setData((byte) 8);
|
block.setData((byte) 8);
|
||||||
|
}
|
||||||
Torrent tor = new Torrent(player);
|
Torrent tor = new Torrent(player);
|
||||||
|
|
||||||
if (tor.sourceSelected || tor.settingUp) {
|
if (tor.sourceSelected || tor.settingUp) {
|
||||||
|
|
|
@ -1,5 +1,18 @@
|
||||||
package com.projectkorra.projectkorra.waterbending;
|
package com.projectkorra.projectkorra.waterbending;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ProjectKorra;
|
import com.projectkorra.projectkorra.ProjectKorra;
|
||||||
import com.projectkorra.projectkorra.ability.ComboAbility;
|
import com.projectkorra.projectkorra.ability.ComboAbility;
|
||||||
|
@ -14,19 +27,6 @@ import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||||
import com.projectkorra.projectkorra.util.TempBlock;
|
import com.projectkorra.projectkorra.util.TempBlock;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.entity.LivingEntity;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
|
||||||
import org.bukkit.util.Vector;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: Combo classes should eventually be rewritten so that each combo is treated
|
* TODO: Combo classes should eventually be rewritten so that each combo is treated
|
||||||
* as an individual ability. In the mean time, we will just place "fake"
|
* as an individual ability. In the mean time, we will just place "fake"
|
||||||
|
@ -305,6 +305,7 @@ public class WaterCombo extends IceAbility implements ComboAbility {
|
||||||
if (waterGrabber != null) {
|
if (waterGrabber != null) {
|
||||||
waterGrabber.remove();
|
waterGrabber.remove();
|
||||||
}
|
}
|
||||||
|
bPlayer.addCooldown(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void revertBlocks() {
|
public void revertBlocks() {
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
package com.projectkorra.projectkorra.waterbending;
|
package com.projectkorra.projectkorra.waterbending;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.Element;
|
import java.util.ArrayList;
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import java.util.Enumeration;
|
||||||
import com.projectkorra.projectkorra.ProjectKorra;
|
import java.util.HashSet;
|
||||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import com.projectkorra.projectkorra.ability.WaterAbility;
|
|
||||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
|
||||||
import com.projectkorra.projectkorra.util.TempBlock;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
@ -18,10 +15,13 @@ import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.projectkorra.projectkorra.Element;
|
||||||
import java.util.Enumeration;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import java.util.HashSet;
|
import com.projectkorra.projectkorra.ProjectKorra;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||||
|
import com.projectkorra.projectkorra.ability.WaterAbility;
|
||||||
|
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||||
|
import com.projectkorra.projectkorra.util.TempBlock;
|
||||||
|
|
||||||
public class WaterSpoutWave extends WaterAbility {
|
public class WaterSpoutWave extends WaterAbility {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue