forked from RepoMirrors/kami-blue
add weakness to textradar and clean up modes
This commit is contained in:
parent
51498c590e
commit
f314dd1fe5
|
@ -312,10 +312,18 @@ public class KamiGUI extends GUI {
|
|||
Map<String, Integer> players = new HashMap<>();
|
||||
for (Entity e : entityList) {
|
||||
if (e.getName().equals(mc.player.getName())) continue;
|
||||
|
||||
String posString = (e.posY > mc.player.posY ? ChatFormatting.DARK_GREEN + "+" : (e.posY == mc.player.posY ? " " : ChatFormatting.DARK_RED + "-"));
|
||||
String strengthfactor = "";
|
||||
EntityPlayer eplayer = (EntityPlayer) e;
|
||||
if (eplayer.isPotionActive(MobEffects.STRENGTH)) strengthfactor = "S "; else strengthfactor = " ";
|
||||
String weaknessFactor;
|
||||
String strengthFactor;
|
||||
String extraPaddingForFactors;
|
||||
EntityPlayer ePlayer = (EntityPlayer) e;
|
||||
|
||||
if (ePlayer.isPotionActive(MobEffects.WEAKNESS)) weaknessFactor = "W"; else weaknessFactor = "";
|
||||
if (ePlayer.isPotionActive(MobEffects.STRENGTH)) strengthFactor = "S"; else strengthFactor = "";
|
||||
if (weaknessFactor.equals("") && strengthFactor.equals("")) extraPaddingForFactors = "";
|
||||
else extraPaddingForFactors = " ";
|
||||
|
||||
float hpRaw = ((EntityLivingBase) e).getHealth() + ((EntityLivingBase) e).getAbsorptionAmount();
|
||||
String hp = dfHealth.format(hpRaw);
|
||||
healthSB.append(KamiMod.colour);
|
||||
|
@ -329,7 +337,8 @@ public class KamiGUI extends GUI {
|
|||
healthSB.append("c");
|
||||
}
|
||||
healthSB.append(hp);
|
||||
players.put(ChatFormatting.GRAY + posString + " " + healthSB.toString() + " " + ChatFormatting.RED + strengthfactor + ChatFormatting.GRAY + e.getName(), (int) mc.player.getDistance(e));
|
||||
|
||||
players.put(ChatFormatting.GRAY + posString + " " + healthSB.toString() + " " + ChatFormatting.DARK_GRAY + weaknessFactor + ChatFormatting.DARK_PURPLE + strengthFactor + ChatFormatting.GRAY + extraPaddingForFactors + e.getName(), (int) mc.player.getDistance(e));
|
||||
healthSB.setLength(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue