mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
commit
9d3d3ab692
2 changed files with 6 additions and 3 deletions
|
@ -788,6 +788,7 @@ public class ConfigManager {
|
||||||
|
|
||||||
config.addDefault("Abilities.Earth.Passive.Duration", 2500);
|
config.addDefault("Abilities.Earth.Passive.Duration", 2500);
|
||||||
config.addDefault("Abilities.Earth.Passive.SandRunSpeed", 2);
|
config.addDefault("Abilities.Earth.Passive.SandRunSpeed", 2);
|
||||||
|
config.addDefault("Abilities.Earth.Passive.SandRunHeight", 3);
|
||||||
|
|
||||||
config.addDefault("Abilities.Earth.Catapult.Enabled", true);
|
config.addDefault("Abilities.Earth.Catapult.Enabled", true);
|
||||||
config.addDefault("Abilities.Earth.Catapult.Length", 6);
|
config.addDefault("Abilities.Earth.Catapult.Length", 6);
|
||||||
|
|
|
@ -24,6 +24,8 @@ public class PassiveHandler {
|
||||||
|
|
||||||
private static final ConcurrentHashMap<Player, Float> FOOD = new ConcurrentHashMap<>();
|
private static final ConcurrentHashMap<Player, Float> FOOD = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
private static int sandRunHeight = ConfigManager.defaultConfig.get().getInt("Abilities.Earth.Passive.SandRunHeight");
|
||||||
|
|
||||||
public static float getExhaustion(Player player, float level, double factor) {
|
public static float getExhaustion(Player player, float level, double factor) {
|
||||||
if (!FOOD.keySet().contains(player)) {
|
if (!FOOD.keySet().contains(player)) {
|
||||||
FOOD.put(player, level);
|
FOOD.put(player, level);
|
||||||
|
@ -106,9 +108,9 @@ public class PassiveHandler {
|
||||||
|
|
||||||
int max = 0;
|
int max = 0;
|
||||||
|
|
||||||
if (sandbender && (player.getLocation().getBlock().getRelative(BlockFace.DOWN).getType() == Material.SAND
|
if (sandbender && (player.getLocation().getBlock().getRelative(BlockFace.DOWN, sandRunHeight).getType() == Material.SAND
|
||||||
|| player.getLocation().getBlock().getRelative(BlockFace.DOWN).getType() == Material.SANDSTONE
|
|| player.getLocation().getBlock().getRelative(BlockFace.DOWN, sandRunHeight).getType() == Material.SANDSTONE
|
||||||
|| player.getLocation().getBlock().getRelative(BlockFace.DOWN).getType() == Material.RED_SANDSTONE)) {
|
|| player.getLocation().getBlock().getRelative(BlockFace.DOWN, sandRunHeight).getType() == Material.RED_SANDSTONE)) {
|
||||||
if (CoreAbility.hasAbility(player, AcrobatStance.class)) {
|
if (CoreAbility.hasAbility(player, AcrobatStance.class)) {
|
||||||
AcrobatStance abil = CoreAbility.getAbility(player, AcrobatStance.class);
|
AcrobatStance abil = CoreAbility.getAbility(player, AcrobatStance.class);
|
||||||
max = Math.max(air, chi);
|
max = Math.max(air, chi);
|
||||||
|
|
Loading…
Reference in a new issue