forked from RepoMirrors/kami-blue
Broken ternary
This commit is contained in:
parent
ed9a8d0a1f
commit
b1c31f7a07
|
@ -21,15 +21,15 @@ public class EntityStatsCommand extends Command {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void call(String[] args) {
|
public void call(String[] args) {
|
||||||
String maxHealth;
|
|
||||||
String speed;
|
|
||||||
if (mc.player.getRidingEntity() != null && mc.player.getRidingEntity() instanceof AbstractHorse) {
|
if (mc.player.getRidingEntity() != null && mc.player.getRidingEntity() instanceof AbstractHorse) {
|
||||||
|
String maxHealth;
|
||||||
|
String speed;
|
||||||
AbstractHorse horse = (AbstractHorse) mc.player.getRidingEntity();
|
AbstractHorse horse = (AbstractHorse) mc.player.getRidingEntity();
|
||||||
// TODO: Function that resolves UUID's to Minecraft usernames. @bella
|
// TODO: Function that resolves UUID's to Minecraft usernames. @bella
|
||||||
Command.sendChatMessage("&6Entity Stats:\n&cMax Health: &b" + horse.getMaxHealth() + " &2HP" + "\n&cSpeed: &b" + round(43.17 * horse.getAIMoveSpeed(), 2) + " &2m/s" + "\n&cJump: &b" + round(-0.1817584952 * Math.pow(horse.getHorseJumpStrength(), 3) + 3.689713992 * Math.pow(horse.getHorseJumpStrength(), 2) + 2.128599134 * horse.getHorseJumpStrength() - 0.343930367, 4) + " &2m" + "\n&cOwner UUID: &b" + horse.getOwnerUniqueId() == null ? "Not tamed." : horse.getOwnerUniqueId().toString());
|
Command.sendChatMessage("&6Entity Stats:\n&cMax Health: &b" + horse.getMaxHealth() + " &2HP" + "\n&cSpeed: &b" + round(43.17 * horse.getAIMoveSpeed(), 2) + " &2m/s" + "\n&cJump: &b" + round(-0.1817584952 * Math.pow(horse.getHorseJumpStrength(), 3) + 3.689713992 * Math.pow(horse.getHorseJumpStrength(), 2) + 2.128599134 * horse.getHorseJumpStrength() - 0.343930367, 4) + " &2m" + "\n&cOwner UUID: &b" + ((horse.getOwnerUniqueId() == null) ? "Not tamed." : horse.getOwnerUniqueId().toString()));
|
||||||
} else if (mc.player.getRidingEntity() instanceof EntityLivingBase) {
|
} else if (mc.player.getRidingEntity() instanceof EntityLivingBase) {
|
||||||
EntityLivingBase entity = (EntityLivingBase) mc.player.getRidingEntity();
|
EntityLivingBase entity = (EntityLivingBase) mc.player.getRidingEntity();
|
||||||
Command.sendChatMessage("&6Entity Stats:\n&cMax Health: &b" + entity.getMaxHealth() + " &2HP" + "\n&cSpeed: &b" + round(43.17 * entity.getAIMoveSpeed(), 2) + " &2m/s";);
|
Command.sendChatMessage("&6Entity Stats:\n&cMax Health: &b" + entity.getMaxHealth() + " &2HP" + "\n&cSpeed: &b" + round(43.17 * entity.getAIMoveSpeed(), 2) + " &2m/s");
|
||||||
} else {
|
} else {
|
||||||
Command.sendChatMessage("&4&lERROR: &cNot riding a compatible entity.");
|
Command.sendChatMessage("&4&lERROR: &cNot riding a compatible entity.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue