Uppercase enum.

This commit is contained in:
2024-02-26 15:12:23 -05:00
parent e1e9bc026a
commit 2e5fa69942
27 changed files with 373 additions and 412 deletions
+1 -1
View File
@@ -1013,7 +1013,7 @@ public class MobAI {
if (mob.isSit() && mob.getTimeStamp("HEALTHRECOVERED") < System.currentTimeMillis() + 3000)
if (mob.getHealth() < mob.getHealthMax()) {
float recoveredHealth = mob.getHealthMax() * ((1 + mob.getBonuses().getFloatPercentAll(Enum.ModType.HealthRecoverRate, Enum.SourceType.None)) * 0.01f);
float recoveredHealth = mob.getHealthMax() * ((1 + mob.getBonuses().getFloatPercentAll(Enum.ModType.HealthRecoverRate, Enum.SourceType.NONE)) * 0.01f);
mob.setHealth(mob.getHealth() + recoveredHealth);
mob.getTimestamps().put("HEALTHRECOVERED", System.currentTimeMillis());
@@ -126,7 +126,7 @@ public class CombatUtilities {
}
public static boolean canSwing(Mob agent) {
return (agent.isAlive() && !agent.getBonuses().getBool(ModType.Stunned, SourceType.None));
return (agent.isAlive() && !agent.getBonuses().getBool(ModType.Stunned, SourceType.NONE));
}
public static void swingIsMiss(Mob agent, AbstractWorldObject target, int animation) {
@@ -216,10 +216,10 @@ public class CombatUtilities {
else
speed = agent.getSpeedHandTwo();
SourceType dt = SourceType.Crushing;
SourceType dt = SourceType.CRUSHING;
if (agent.isSiege())
dt = SourceType.Siege;
dt = SourceType.SIEGE;
if (wb != null) {
anim = CombatManager.getSwingAnimation(wb, null, mainHand);
dt = wb.getDamageType();
@@ -246,7 +246,7 @@ public class CombatUtilities {
//must not be immune to all or immune to attack
if (bonus != null && !bonus.getBool(ModType.NoMod, SourceType.ImmuneToAttack))
if (bonus != null && !bonus.getBool(ModType.NoMod, SourceType.IMMUNETOATTACK))
if (res != null && (res.immuneToAll() || res.immuneToAttacks() || res.immuneTo(dt)))
return;
@@ -330,7 +330,7 @@ public class CombatUtilities {
}
public static SourceType getDamageType(Mob agent) {
SourceType dt = SourceType.Crushing;
SourceType dt = SourceType.CRUSHING;
if (agent.getEquip().get(1) != null) {
return agent.getEquip().get(1).getItemBase().getDamageType();
}
@@ -169,7 +169,7 @@ public class MovementUtilities {
if (agent.getMobBase() != null && Enum.MobFlagType.SENTINEL.elementOf(agent.getMobBase().getFlags()))
return false;
return (agent.isAlive() && !agent.getBonuses().getBool(ModType.Stunned, SourceType.None) && !agent.getBonuses().getBool(ModType.CannotMove, SourceType.None));
return (agent.isAlive() && !agent.getBonuses().getBool(ModType.Stunned, SourceType.NONE) && !agent.getBonuses().getBool(ModType.CannotMove, SourceType.NONE));
}
public static Vector3fImmutable randomPatrolLocation(Mob agent, Vector3fImmutable center, float radius) {