mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
commit
a3697e52f5
7 changed files with 19 additions and 4 deletions
|
@ -83,7 +83,7 @@ public class AirSpout extends AirAbility {
|
|||
|
||||
@Override
|
||||
public void progress() {
|
||||
if (player.isDead() || !player.isOnline() || !bPlayer.canBind(this)) {
|
||||
if (player.isDead() || !player.isOnline() || !bPlayer.canBendIgnoreBindsCooldowns(this)) {
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -552,6 +552,7 @@ public class ConfigManager {
|
|||
config.addDefault("Abilities.Water.WaterSpout.Particles", false);
|
||||
config.addDefault("Abilities.Water.WaterSpout.Wave.Particles", false);
|
||||
config.addDefault("Abilities.Water.WaterSpout.Wave.Enabled", true);
|
||||
config.addDefault("Abilities.Water.WaterSpout.Wave.AllowPlantSource", true);
|
||||
config.addDefault("Abilities.Water.WaterSpout.Wave.Radius", 3.8);
|
||||
config.addDefault("Abilities.Water.WaterSpout.Wave.WaveRadius", 1.5);
|
||||
config.addDefault("Abilities.Water.WaterSpout.Wave.SelectRange", 6);
|
||||
|
|
|
@ -37,6 +37,7 @@ public class EarthBlast extends EarthAbility {
|
|||
private double selectRange;
|
||||
private double deflectRange;
|
||||
private double collisionRadius;
|
||||
private byte sourceData;
|
||||
private Material sourceType;
|
||||
private Location location;
|
||||
private Location destination;
|
||||
|
@ -98,6 +99,7 @@ public class EarthBlast extends EarthAbility {
|
|||
EarthPassive.revertSand(sourceBlock);
|
||||
}
|
||||
|
||||
sourceData = sourceBlock.getData();
|
||||
if (sourceBlock.getType() == Material.SAND) {
|
||||
sourceType = Material.SAND;
|
||||
if (sourceBlock.getData() == (byte) 0x1) {
|
||||
|
@ -280,6 +282,7 @@ public class EarthBlast extends EarthAbility {
|
|||
|
||||
if (isEarthRevertOn()) {
|
||||
sourceBlock.setType(sourceType);
|
||||
sourceBlock.setData(sourceData);
|
||||
if (sourceBlock.getType() == Material.RED_SANDSTONE && sourceType == Material.SAND) {
|
||||
sourceBlock.setData((byte) 0x1);
|
||||
}
|
||||
|
@ -345,10 +348,12 @@ public class EarthBlast extends EarthAbility {
|
|||
}
|
||||
} else {
|
||||
sourceBlock.setType(sourceType);
|
||||
sourceBlock.setData(sourceData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void throwEarth() {
|
||||
if (sourceBlock == null || !sourceBlock.getWorld().equals(player.getWorld())) {
|
||||
return;
|
||||
|
@ -381,6 +386,7 @@ public class EarthBlast extends EarthAbility {
|
|||
|
||||
Material currentType = sourceBlock.getType();
|
||||
sourceBlock.setType(sourceType);
|
||||
sourceBlock.setData(sourceData);
|
||||
if (isEarthRevertOn()) {
|
||||
addTempAirBlock(sourceBlock);
|
||||
} else {
|
||||
|
|
|
@ -75,7 +75,8 @@ public class EarthPassive {
|
|||
return true;
|
||||
}
|
||||
|
||||
return EarthAbility.isEarthbendable(player, block) || EarthAbility.isTransparent(player, block);
|
||||
return (TempBlock.isTempBlock(block) && EarthAbility.isEarthbendable(TempBlock.get(block).getBlock().getType()))
|
||||
|| EarthAbility.isEarthbendable(player, block) || EarthAbility.isTransparent(player, block);
|
||||
}
|
||||
|
||||
public static boolean isPassiveSand(Block block) {
|
||||
|
|
|
@ -397,6 +397,9 @@ public class EarthSmash extends EarthAbility {
|
|||
}
|
||||
for (BlockRepresenter blockRep : currentBlocks) {
|
||||
Block block = location.clone().add(blockRep.getX(), blockRep.getY(), blockRep.getZ()).getBlock();
|
||||
if (block.getType().equals(Material.SAND) || block.getType().equals(Material.GRAVEL)) { //Check if block can be affected by gravity.
|
||||
addTempAirBlock(block); //If so, set it to a temp air block.
|
||||
}
|
||||
if (player != null && isTransparent(block)) {
|
||||
affectedBlocks.add(new TempBlock(block, blockRep.getType(), blockRep.getData()));
|
||||
getPreventEarthbendingBlocks().add(block);
|
||||
|
|
|
@ -82,6 +82,8 @@ public class Torrent extends WaterAbility {
|
|||
oldTorrent.use();
|
||||
bPlayer.addCooldown("Torrent", oldTorrent.cooldown);
|
||||
return;
|
||||
} else {
|
||||
oldTorrent.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ public class WaterSpoutWave extends WaterAbility {
|
|||
private boolean iceWave;
|
||||
private boolean iceOnly;
|
||||
private boolean moving;
|
||||
private boolean plant;
|
||||
private int progressCounter;
|
||||
private long time;
|
||||
private long cooldown;
|
||||
|
@ -62,6 +63,7 @@ public class WaterSpoutWave extends WaterAbility {
|
|||
this.charging = false;
|
||||
this.iceWave = false;
|
||||
this.iceOnly = false;
|
||||
this.plant = getConfig().getBoolean("Abilities.Water.WaterSpout.Wave.AllowPlantSource");
|
||||
this.radius = getConfig().getDouble("Abilities.Water.WaterSpout.Wave.Radius");
|
||||
this.waveRadius = getConfig().getDouble("Abilities.Water.WaterSpout.Wave.WaveRadius");
|
||||
this.animationSpeed = getConfig().getDouble("Abilities.Water.WaterSpout.Wave.AnimationSpeed");
|
||||
|
@ -112,7 +114,7 @@ public class WaterSpoutWave extends WaterAbility {
|
|||
if (type == AbilityType.CLICK) {
|
||||
if (origin == null) {
|
||||
removeOldType(player, AbilityType.CLICK);
|
||||
Block block = getWaterSourceBlock(player, selectRange, false);
|
||||
Block block = getWaterSourceBlock(player, selectRange, plant);
|
||||
|
||||
if (block == null) {
|
||||
remove();
|
||||
|
@ -439,7 +441,7 @@ public class WaterSpoutWave extends WaterAbility {
|
|||
|
||||
@Override
|
||||
public boolean isSneakAbility() {
|
||||
return true;
|
||||
return this.isIceWave() ? true : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue