mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Tremorsense now takes priority over Illumination, IceSpear sphere now forms underwater (#575)
This commit is contained in:
parent
69d7974160
commit
92d32bcb9a
6 changed files with 30 additions and 7 deletions
|
@ -1625,7 +1625,12 @@ public class PKListener implements Listener {
|
|||
new HeatControlExtinguish(player);
|
||||
}
|
||||
if (abil.equalsIgnoreCase("Illumination")) {
|
||||
if (ConfigManager.defaultConfig.get().getBoolean("Abilities.Fire.Illumination.Passive")) {
|
||||
bPlayer.toggleIllumination();
|
||||
} else {
|
||||
new Illumination(player);
|
||||
}
|
||||
|
||||
}
|
||||
if (abil.equalsIgnoreCase("FireBurst")) {
|
||||
FireBurst.coneBurst(player);
|
||||
|
|
|
@ -1026,6 +1026,7 @@ public class ConfigManager {
|
|||
config.addDefault("Abilities.Fire.HeatControl.Cook.CookTime", 2000);
|
||||
|
||||
config.addDefault("Abilities.Fire.Illumination.Enabled", true);
|
||||
config.addDefault("Abilities.Fire.Illumination.Passive", true);
|
||||
config.addDefault("Abilities.Fire.Illumination.Range", 5);
|
||||
config.addDefault("Abilities.Fire.Illumination.Cooldown", 500);
|
||||
config.addDefault("Abilities.Fire.Illumination.LightThreshold", 7);
|
||||
|
|
|
@ -131,15 +131,23 @@ public class Tremorsense extends EarthAbility {
|
|||
|
||||
public static void manage(Server server) {
|
||||
for (Player player : server.getOnlinePlayers()) {
|
||||
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
|
||||
|
||||
if (bPlayer != null && !hasAbility(player, Tremorsense.class)
|
||||
&& bPlayer.canBendIgnoreBinds(getAbility("Tremorsense"))) {
|
||||
if (canTremorSense(player) && !hasAbility(player, Tremorsense.class)) {
|
||||
new Tremorsense(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean canTremorSense(Player player) {
|
||||
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
|
||||
|
||||
if (bPlayer != null && bPlayer.canBendIgnoreBindsCooldowns(getAbility("Tremorsense"))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Map<Block, Player> getBlocks() {
|
||||
return BLOCKS;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.projectkorra.projectkorra.Element;
|
|||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||
import com.projectkorra.projectkorra.command.Commands;
|
||||
import com.projectkorra.projectkorra.configuration.ConfigManager;
|
||||
import com.projectkorra.projectkorra.earthbending.Tremorsense;
|
||||
|
||||
public class FirePassive {
|
||||
|
||||
|
@ -23,10 +24,12 @@ public class FirePassive {
|
|||
}
|
||||
|
||||
if (bPlayer != null && !CoreAbility.hasAbility(player, Illumination.class)
|
||||
&& bPlayer.canBendIgnoreBinds(CoreAbility.getAbility("Illumination"))) {
|
||||
&& bPlayer.canBendIgnoreBinds(CoreAbility.getAbility("Illumination")) && ConfigManager.defaultConfig.get().getBoolean("Abilities.Fire.Illumination.Passive")) {
|
||||
if (!Tremorsense.canTremorSense(player)) {
|
||||
new Illumination(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import org.bukkit.entity.Player;
|
|||
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ability.FireAbility;
|
||||
import com.projectkorra.projectkorra.earthbending.Tremorsense;
|
||||
import com.projectkorra.projectkorra.util.TempBlock;
|
||||
|
||||
public class Illumination extends FireAbility {
|
||||
|
@ -69,6 +70,11 @@ public class Illumination extends FireAbility {
|
|||
return;
|
||||
}
|
||||
|
||||
if (Tremorsense.canTremorSense(player)) {
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if (oldLevel > this.lightThreshold) {
|
||||
remove();
|
||||
return;
|
||||
|
|
|
@ -35,7 +35,7 @@ public class WaterArms extends WaterAbility {
|
|||
}
|
||||
|
||||
private static final Map<Block, Long> BLOCK_REVERT_TIMES = new ConcurrentHashMap<Block, Long>();
|
||||
private static final Integer[] UNBREAKABLES = { 7, 8, 9, 10, 11, 49, 54, 90, 119, 120, 130, 146 };
|
||||
private static final Integer[] UNBREAKABLES = { 7, 10, 11, 49, 54, 90, 119, 120, 130, 146 };
|
||||
|
||||
private boolean cooldownLeft;
|
||||
private boolean cooldownRight;
|
||||
|
|
Loading…
Reference in a new issue