mirror of https://github.com/kami-blue/client
Textradar StrengthDetect (#441)
* strengthdetect * remove whitelines and stuff * Update KamiGUI.java
This commit is contained in:
parent
32a8b47db3
commit
2e1e21524c
|
@ -19,6 +19,7 @@ import me.zeroeightsix.kami.gui.rgui.util.ContainerHelper;
|
|||
import me.zeroeightsix.kami.gui.rgui.util.Docking;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.ModuleManager;
|
||||
import me.zeroeightsix.kami.module.modules.combat.StrengthDetect;
|
||||
import me.zeroeightsix.kami.module.modules.gui.InfoOverlay;
|
||||
import me.zeroeightsix.kami.util.ColourHolder;
|
||||
import me.zeroeightsix.kami.util.Friends;
|
||||
|
@ -32,6 +33,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.entity.projectile.EntityEgg;
|
||||
import net.minecraft.entity.projectile.EntitySnowball;
|
||||
import net.minecraft.entity.projectile.EntityWitherSkull;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -315,6 +317,9 @@ public class KamiGUI extends GUI {
|
|||
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) & ModuleManager.isModuleEnabled("StrengthDetect")) strengthfactor = "S ";
|
||||
float hpRaw = ((EntityLivingBase) e).getHealth() + ((EntityLivingBase) e).getAbsorptionAmount();
|
||||
String hp = dfHealth.format(hpRaw);
|
||||
healthSB.append(KamiMod.colour);
|
||||
|
@ -328,7 +333,7 @@ public class KamiGUI extends GUI {
|
|||
healthSB.append("c");
|
||||
}
|
||||
healthSB.append(hp);
|
||||
players.put(ChatFormatting.GRAY + posString + " " + healthSB.toString() + " " + ChatFormatting.GRAY + e.getName(), (int) mc.player.getDistance(e));
|
||||
players.put(ChatFormatting.GRAY + posString + " " + healthSB.toString() + " " + ChatFormatting.RED + strengthfactor + ChatFormatting.GRAY + e.getName(), (int) mc.player.getDistance(e));
|
||||
healthSB.setLength(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
package me.zeroeightsix.kami.module.modules.combat;
|
||||
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
|
||||
@Module.Info(name = "StrengthDetect", category = Module.Category.COMBAT, description = "Displays active strength effect of players in the text radar")
|
||||
public class StrengthDetect extends Module {}
|
Loading…
Reference in New Issue