Skip to content

Commit

Permalink
Remove mount health compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Madis0 committed Nov 17, 2021
1 parent 7afdf63 commit 08846e0
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/main/java/io/github/madis0/mixin/InGameHudMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ private void hideXpBarCompat(MatrixStack matrices, int x, CallbackInfo ci){
private void hideHorseJumpCompat(MatrixStack matrices, int x, CallbackInfo ci) {
if(config.otherBars.compatibilityMode) mountJump(ci);
}
@Inject(method = "renderMountHealth", at = @At(value = "TAIL"), cancellable = true)
private void hideHorseHealthCompat(MatrixStack matrices, CallbackInfo ci) {
if(config.otherBars.compatibilityMode) mountHealth(ci);
}

// "Override" injections

Expand All @@ -70,7 +66,10 @@ private void hideHorseJump(MatrixStack matrices, int x, CallbackInfo ci) {
}
@Inject(method = "renderMountHealth", at = @At(value = "HEAD"), cancellable = true)
private void hideHorseHealth(MatrixStack matrices, CallbackInfo ci) {
if(!config.otherBars.compatibilityMode) mountHealth(ci);
if(showOneBar){
ci.cancel();
oneBarElements.mountBar(getRiddenEntity());
}
}

private void genericCancel(CallbackInfo ci){
Expand All @@ -84,11 +83,4 @@ private void mountJump(CallbackInfo ci){
oneBarElements.jumpBar();
}
}

private void mountHealth(CallbackInfo ci){
if(showOneBar){
ci.cancel();
oneBarElements.mountBar(getRiddenEntity());
}
}
}

0 comments on commit 08846e0

Please sign in to comment.