-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Beta Hud for <= beta 1.7.3 fixed ViaAprilFools implementation
- Loading branch information
1 parent
54494b4
commit dc23ac5
Showing
18 changed files
with
102 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
.../de/florianmichael/viafabricplus/injection/mixin/fixes/MixinChestBlockEntityRenderer.java
This file was deleted.
Oops, something went wrong.
79 changes: 79 additions & 0 deletions
79
src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/MixinInGameHud.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package de.florianmichael.viafabricplus.injection.mixin.fixes; | ||
|
||
import de.florianmichael.viafabricplus.settings.groups.VisualSettings; | ||
import net.minecraft.client.gui.hud.InGameHud; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import net.minecraft.entity.JumpingMount; | ||
import net.minecraft.entity.LivingEntity; | ||
import org.objectweb.asm.Opcodes; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.*; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(InGameHud.class) | ||
public abstract class MixinInGameHud { | ||
|
||
@Shadow | ||
protected abstract int getHeartCount(LivingEntity entity); | ||
|
||
@Shadow | ||
private int scaledWidth; | ||
|
||
@Shadow private int scaledHeight; | ||
|
||
// Removing newer elements | ||
|
||
@Inject(method = "renderExperienceBar", at = @At("HEAD"), cancellable = true) | ||
public void removeExperienceBar(MatrixStack matrices, int x, CallbackInfo ci) { | ||
if (VisualSettings.getClassWrapper().removeNewerHudElements.getValue()) ci.cancel(); | ||
} | ||
|
||
@Inject(method = "renderMountJumpBar", at = @At("HEAD"), cancellable = true) | ||
public void removeMountJumpBar(JumpingMount mount, MatrixStack matrices, int x, CallbackInfo ci) { | ||
if (VisualSettings.getClassWrapper().removeNewerHudElements.getValue()) ci.cancel(); | ||
} | ||
|
||
@Inject(method = "renderMountHealth", at = @At("HEAD"), cancellable = true) | ||
public void removeMountHealth(MatrixStack matrices, CallbackInfo ci) { | ||
if (VisualSettings.getClassWrapper().removeNewerHudElements.getValue()) ci.cancel(); | ||
} | ||
|
||
@Redirect(method = "renderStatusBars", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;getHeartCount(Lnet/minecraft/entity/LivingEntity;)I")) | ||
private int removeHungerBar(InGameHud instance, LivingEntity entity) { | ||
if (VisualSettings.getClassWrapper().removeNewerHudElements.getValue()) return 1; | ||
return getHeartCount(entity); | ||
} | ||
|
||
// Moving down all remaining elements | ||
|
||
@Redirect(method = "renderStatusBars", at = @At(value = "FIELD", target = "Lnet/minecraft/client/gui/hud/InGameHud;scaledHeight:I", opcode = Opcodes.GETFIELD)) | ||
private int moveHealthDown(InGameHud instance) { | ||
if (VisualSettings.getClassWrapper().removeNewerHudElements.getValue()) return scaledHeight + 6; | ||
return scaledHeight; | ||
} | ||
|
||
@ModifyArg(method = "renderStatusBars", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;drawTexture(Lnet/minecraft/client/util/math/MatrixStack;IIIIII)V"), slice = @Slice( | ||
from = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;push(Ljava/lang/String;)V"), | ||
to = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", ordinal = 0)), index = 1) | ||
private int moveArmor(int old) { | ||
if (VisualSettings.getClassWrapper().removeNewerHudElements.getValue()) return scaledWidth - old - 9; | ||
return old; | ||
} | ||
|
||
@ModifyArg(method = "renderStatusBars", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;drawTexture(Lnet/minecraft/client/util/math/MatrixStack;IIIIII)V"), slice = @Slice( | ||
from = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;push(Ljava/lang/String;)V"), | ||
to = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", ordinal = 0)), index = 2) | ||
private int moveArmorDown(int old) { | ||
if (VisualSettings.getClassWrapper().removeNewerHudElements.getValue()) return scaledWidth - 39 + 6; | ||
return old; | ||
} | ||
|
||
@ModifyArg(method = "renderStatusBars", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;drawTexture(Lnet/minecraft/client/util/math/MatrixStack;IIIIII)V"), slice = @Slice( | ||
from = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", ordinal = 2), | ||
to = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;pop()V")), index = 1) | ||
private int moveAir(int old) { | ||
if (VisualSettings.getClassWrapper().removeNewerHudElements.getValue()) return scaledWidth - old - 9; | ||
return old; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
src/main/resources/assets/minecraft/blockstates/chest.json
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/main/resources/assets/viafabricplus/models/block/chest_left.json
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/main/resources/assets/viafabricplus/models/block/chest_right.json
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
src/main/resources/assets/viafabricplus/models/block/chest_single.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-332 Bytes
src/main/resources/assets/viafabricplus/textures/block/chest_end.png
Binary file not shown.
Binary file removed
BIN
-378 Bytes
src/main/resources/assets/viafabricplus/textures/block/chest_left_back.png
Binary file not shown.
Binary file removed
BIN
-399 Bytes
src/main/resources/assets/viafabricplus/textures/block/chest_left_front.png
Binary file not shown.
Binary file removed
BIN
-358 Bytes
src/main/resources/assets/viafabricplus/textures/block/chest_right_back.png
Binary file not shown.
Binary file removed
BIN
-415 Bytes
src/main/resources/assets/viafabricplus/textures/block/chest_right_front.png
Binary file not shown.
Binary file removed
BIN
-452 Bytes
src/main/resources/assets/viafabricplus/textures/block/chest_single_front.png
Binary file not shown.
Binary file removed
BIN
-387 Bytes
src/main/resources/assets/viafabricplus/textures/block/chest_single_side.png
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters