Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.21.4 #22

Merged
merged 3 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
}

Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/versions.html

minecraft_version=1.21
yarn_mappings=1.21+build.4
loader_version=0.15.11
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.8
loader_version=0.16.10


# Mod Properties
mod_version = 1.3b5
mod_version = 1.3b6
maven_group = ca.blutopia
archives_base_name = removehud

# Dependencies
fabric_version=0.100.4+1.21
modmenu_version=11.0.1
clothconfig_version=15.0.127
fabric_version=0.115.1+1.21.4
modmenu_version=13.0.1
clothconfig_version=17.0.144
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
72 changes: 43 additions & 29 deletions src/main/java/ca/blutopia/removehud/mixin/RemoveHudButNotHand.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public void renderHotBar(DrawContext context, RenderTickCounter tickCounter, Cal
method = "renderHotbar(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/client/render/RenderTickCounter;)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V"),
index = 1)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 2)
private int modifyHotbarX(int value) {
return value + ModConfig.INSTANCE.HotBarXOffset;
}
Expand All @@ -38,8 +38,8 @@ private int modifyHotbarX(int value) {
method = "renderHotbar(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/client/render/RenderTickCounter;)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V"),
index = 2)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 3)
private int modifyHotbarY(int value) {
return value + ModConfig.INSTANCE.HotBarYOffset;
}
Expand Down Expand Up @@ -137,8 +137,8 @@ private static void renderArmor(DrawContext context, PlayerEntity player, int i,
method = "renderArmor(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/entity/player/PlayerEntity;IIII)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V"),
index = 1)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 2)
private static int modifyArmorBarX(int value) {
return value + ModConfig.INSTANCE.ArmorXOffset;
}
Expand All @@ -147,8 +147,8 @@ private static int modifyArmorBarX(int value) {
method = "renderArmor(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/entity/player/PlayerEntity;IIII)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V"),
index = 2)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 3)
private static int modifyArmorBarY(int value) {
return value + ModConfig.INSTANCE.ArmorYOffset;
}
Expand All @@ -164,8 +164,8 @@ public void renderFood(DrawContext context, PlayerEntity player, int top, int ri
method = "renderFood(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/entity/player/PlayerEntity;II)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V"),
index = 1)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 2)
private int modifyFoodBarX(int value) {
return value + ModConfig.INSTANCE.FoodXOffset;
}
Expand All @@ -174,23 +174,37 @@ private int modifyFoodBarX(int value) {
method = "renderFood(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/entity/player/PlayerEntity;II)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V"),
index = 2)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 3)
private int modifyFoodBarY(int value) {
return value + ModConfig.INSTANCE.FoodYOffset;
}

@Redirect(method = "renderStatusBars(Lnet/minecraft/client/gui/DrawContext;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V", ordinal = 0))
private void renderAirBubbles(DrawContext instance, Identifier texture, int x, int y, int width, int height) {
if (ModConfig.INSTANCE.AirBar) {
instance.drawGuiTexture(texture, x + ModConfig.INSTANCE.AirXOffset, y + ModConfig.INSTANCE.AirYOffset, width, height);
@Inject(method = "renderAirBubbles(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/entity/player/PlayerEntity;III)V", at = @At("HEAD"), cancellable = true)
public void renderAirBubbles(DrawContext context, PlayerEntity player, int heartCount, int top, int left, CallbackInfo ci) {
if (!ModConfig.INSTANCE.AirBar) {
ci.cancel();
}
}
@Redirect(method = "renderStatusBars(Lnet/minecraft/client/gui/DrawContext;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V", ordinal = 1))
private void renderBurstingAirBubble(DrawContext instance, Identifier texture, int x, int y, int width, int height) {
if (ModConfig.INSTANCE.AirBar) {
instance.drawGuiTexture(texture, x + ModConfig.INSTANCE.AirXOffset, y + ModConfig.INSTANCE.AirYOffset, width, height);
}

@ModifyArg(
method = "renderAirBubbles(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/entity/player/PlayerEntity;III)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 2)
private int modifyAirBubblesX(int value) {
return value + ModConfig.INSTANCE.AirXOffset;
}

@ModifyArg(
method = "renderAirBubbles(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/entity/player/PlayerEntity;III)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 3)
private int modifyAirBubblesY(int value) {
return value + ModConfig.INSTANCE.AirYOffset;
}

@Inject(method = "renderMountHealth(Lnet/minecraft/client/gui/DrawContext;)V", at = @At("HEAD"), cancellable = true)
Expand Down Expand Up @@ -294,8 +308,8 @@ public void renderExperienceBar(DrawContext context, int x, CallbackInfo ci) {
method = "renderExperienceBar(Lnet/minecraft/client/gui/DrawContext;I)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V"),
index = 1)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 2)
private int modifyExperienceBarBackgroundX(int value) {
return value + ModConfig.INSTANCE.ExpBarXOffset;
}
Expand All @@ -304,8 +318,8 @@ private int modifyExperienceBarBackgroundX(int value) {
method = "renderExperienceBar(Lnet/minecraft/client/gui/DrawContext;I)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIII)V"),
index = 2)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIII)V"),
index = 3)
private int modifyExperienceBarBackgroundY(int value) {
return value + ModConfig.INSTANCE.ExpBarYOffset;
}
Expand All @@ -314,8 +328,8 @@ private int modifyExperienceBarBackgroundY(int value) {
method = "renderExperienceBar(Lnet/minecraft/client/gui/DrawContext;I)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIIIIIII)V"),
index = 5)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIIIIIII)V"),
index = 6)
private int modifyExperienceBarForegroundX(int value) {
return value + ModConfig.INSTANCE.ExpBarXOffset;
}
Expand All @@ -324,8 +338,8 @@ private int modifyExperienceBarForegroundX(int value) {
method = "renderExperienceBar(Lnet/minecraft/client/gui/DrawContext;I)V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lnet/minecraft/util/Identifier;IIIIIIII)V"),
index = 6)
target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Ljava/util/function/Function;Lnet/minecraft/util/Identifier;IIIIIIII)V"),
index = 7)
private int modifyExperienceBarForegroundY(int value) {
return value + ModConfig.INSTANCE.ExpBarYOffset;
}
Expand Down