|
@@ -29,7 +29,7 @@ public abstract class HorseScreenMixin extends HandledScreen<HorseScreenHandler>
|
|
horseBaseEntity = horseBaseEntity_1;
|
|
horseBaseEntity = horseBaseEntity_1;
|
|
}
|
|
}
|
|
|
|
|
|
- @Inject(method = "onDrawForeground", at = @At("RETURN"))
|
|
|
|
|
|
+ @Inject(method = "drawForeground", at = @At("RETURN"))
|
|
private void onDrawForeground(int int_1, int int_2, CallbackInfo ci) {
|
|
private void onDrawForeground(int int_1, int int_2, CallbackInfo ci) {
|
|
boolean hasChest = false;
|
|
boolean hasChest = false;
|
|
if(AbstractDonkeyEntity.class.isAssignableFrom(horseBaseEntity.getClass())) {
|
|
if(AbstractDonkeyEntity.class.isAssignableFrom(horseBaseEntity.getClass())) {
|
|
@@ -39,26 +39,26 @@ public abstract class HorseScreenMixin extends HandledScreen<HorseScreenHandler>
|
|
}
|
|
}
|
|
DecimalFormat df = new DecimalFormat("#.#");
|
|
DecimalFormat df = new DecimalFormat("#.#");
|
|
String jumpstrength = df.format(horseBaseEntity.getJumpStrength() * 10);
|
|
String jumpstrength = df.format(horseBaseEntity.getJumpStrength() * 10);
|
|
- // String maxHealth = df.format(horseBaseEntity.getMaximumHealth());
|
|
|
|
- // String speed = df.format(horseBaseEntity.getAttributes().get(EntityAttributes.MOVEMENT_SPEED).getValue() * 100);
|
|
|
|
- // if(!hasChest) {
|
|
|
|
- // this.font.draw("➟ ", 89.0F, 26.0F, 4210752);
|
|
|
|
- // this.font.draw("" + speed, 100.0F, 26.0F, 4210752);
|
|
|
|
- // this.font.draw("⇮", 91.0F, 36.0F, 4210752);
|
|
|
|
- // this.font.draw("" + jumpstrength, 100.0F, 36.0F, 4210752);
|
|
|
|
- // this.font.draw("♥", 90.0F, 46.0F, 4210752);
|
|
|
|
- // this.font.draw("" + maxHealth, 100.0F, 46.0F, 4210752);
|
|
|
|
- // } else {
|
|
|
|
- // this.font.draw("➟ " + speed, 80.0F, 6.0F, 4210752);
|
|
|
|
- // this.font.draw("⇮ " + jumpstrength, 115.0F, 6.0F, 4210752);
|
|
|
|
- // this.font.draw("♥ " + maxHealth, 140.0F, 6.0F, 4210752);
|
|
|
|
- // }
|
|
|
|
- // if(LlamaEntity.class.isAssignableFrom(horseBaseEntity.getClass())) {
|
|
|
|
- // int strength = 3 * ((LlamaEntity)horseBaseEntity).getStrength();
|
|
|
|
- // if(!hasChest) {
|
|
|
|
- // this.font.draw("▦", 91.0F, 56.0F, 4210752);
|
|
|
|
- // this.font.draw("" + strength, 100.0F, 56.0F, 4210752);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
|
|
+ String maxHealth = df.format(horseBaseEntity.getMaximumHealth());
|
|
|
|
+ String speed = df.format(horseBaseEntity.getAttributes().get(EntityAttributes.MOVEMENT_SPEED).getValue() * 100);
|
|
|
|
+ if(!hasChest) {
|
|
|
|
+ this.font.draw("➟ ", 89.0F, 26.0F, 4210752);
|
|
|
|
+ this.font.draw("" + speed, 100.0F, 26.0F, 4210752);
|
|
|
|
+ this.font.draw("⇮", 91.0F, 36.0F, 4210752);
|
|
|
|
+ this.font.draw("" + jumpstrength, 100.0F, 36.0F, 4210752);
|
|
|
|
+ this.font.draw("♥", 90.0F, 46.0F, 4210752);
|
|
|
|
+ this.font.draw("" + maxHealth, 100.0F, 46.0F, 4210752);
|
|
|
|
+ } else {
|
|
|
|
+ this.font.draw("➟ " + speed, 80.0F, 6.0F, 4210752);
|
|
|
|
+ this.font.draw("⇮ " + jumpstrength, 115.0F, 6.0F, 4210752);
|
|
|
|
+ this.font.draw("♥ " + maxHealth, 140.0F, 6.0F, 4210752);
|
|
|
|
+ }
|
|
|
|
+ if(LlamaEntity.class.isAssignableFrom(horseBaseEntity.getClass())) {
|
|
|
|
+ int strength = 3 * ((LlamaEntity)horseBaseEntity).getStrength();
|
|
|
|
+ if(!hasChest) {
|
|
|
|
+ this.font.draw("▦", 91.0F, 56.0F, 4210752);
|
|
|
|
+ this.font.draw("" + strength, 100.0F, 56.0F, 4210752);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|