Fixed torrent temp flooding and IceWave cooldown.

* Fixed torrent temp flooding.

* Fixed IceWave cooldown.
This commit is contained in:
Jay Stannon 2016-07-23 13:30:31 +10:00 committed by OmniCypher
parent ba05e47118
commit db61b0d979
3 changed files with 29 additions and 26 deletions

View file

@ -483,8 +483,10 @@ public class Torrent extends WaterAbility {
Location eyeLoc = player.getEyeLocation();
Block block = eyeLoc.add(eyeLoc.getDirection().normalize()).getBlock();
if (isTransparent(player, block) && isTransparent(player, eyeLoc.getBlock())) {
block.setType(Material.WATER);
block.setData((byte) 8);
if(block.getType() != Material.WATER) {
block.setType(Material.STATIONARY_WATER);
block.setData((byte) 8);
}
Torrent tor = new Torrent(player);
if (tor.sourceSelected || tor.settingUp) {

View file

@ -1,5 +1,18 @@
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.ProjectKorra;
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.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
* 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) {
waterGrabber.remove();
}
bPlayer.addCooldown(this);
}
public void revertBlocks() {

View file

@ -1,12 +1,9 @@
package com.projectkorra.projectkorra.waterbending;
import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.ability.WaterAbility;
import com.projectkorra.projectkorra.util.DamageHandler;
import com.projectkorra.projectkorra.util.TempBlock;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.concurrent.ConcurrentHashMap;
import org.bukkit.Location;
import org.bukkit.Material;
@ -18,10 +15,13 @@ 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.HashSet;
import java.util.concurrent.ConcurrentHashMap;
import com.projectkorra.projectkorra.Element;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ProjectKorra;
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 {