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