|
@@ -15,8 +15,8 @@ public abstract class IngameHudMixin {
|
|
@Shadow @Final private MinecraftClient client;
|
|
@Shadow @Final private MinecraftClient client;
|
|
|
|
|
|
@ModifyConstant(method = "renderMountHealth", constant = @Constant(intValue = 39))
|
|
@ModifyConstant(method = "renderMountHealth", constant = @Constant(intValue = 39))
|
|
- private int bettermounthud$moveMountHealthUp(int original) {
|
|
|
|
- return original + 10;
|
|
|
|
|
|
+ private int bettermounthud$moveMountHealthUp(int yOffset) {
|
|
|
|
+ return yOffset + 10;
|
|
}
|
|
}
|
|
|
|
|
|
@Redirect(method = "renderStatusBars", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;getHeartCount(Lnet/minecraft/entity/LivingEntity;)I"))
|
|
@Redirect(method = "renderStatusBars", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;getHeartCount(Lnet/minecraft/entity/LivingEntity;)I"))
|
|
@@ -24,6 +24,14 @@ public abstract class IngameHudMixin {
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ModifyVariable(method = "renderStatusBars", at = @At(value = "STORE", ordinal = 1), ordinal = 10)
|
|
|
|
+ private int bettermounthud$moveAirUp(int y) {
|
|
|
|
+ if (client.player.hasJumpingMount()) {
|
|
|
|
+ y -= 10;
|
|
|
|
+ }
|
|
|
|
+ return y;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;hasJumpingMount()Z"))
|
|
@Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;hasJumpingMount()Z"))
|
|
private boolean bettermounthud$switchBar(ClientPlayerEntity player) {
|
|
private boolean bettermounthud$switchBar(ClientPlayerEntity player) {
|
|
if (!player.hasJumpingMount()) return false;
|
|
if (!player.hasJumpingMount()) return false;
|