Skip to content

Commit

Permalink
Finished Port to 1.18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Leclowndu93150 committed May 1, 2024
1 parent 31428c9 commit ce10415
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ dependencies {
}

mixin {
// MixinGradle Settings
add sourceSets.main, 'mixins.duradisplay.refmap.json'
config 'mixins.duradisplay.json'
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/leclowndu93150/duradisplay/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static boolean renderDurability(Font font, ItemStack stack, int xPosition
double energyPercentage = ((double) energyStored / (double) maxEnergyStorage) * 100D;
renderText(font, String.format("%.0f%%", energyPercentage), xPosition, yPosition, 0x34D8EB); // Custom color for energy display
});
} else {
} else{
int l = stack.getBarWidth();
int i = stack.getBarColor();
int j = xPosition + 2;
Expand All @@ -76,7 +76,7 @@ private static void renderText(Font font, String text, int xPosition, int yPosit
int y = (yPosition * 2) + 22;
poseStack.pushPose();
poseStack.scale(0.5F, 0.5F, 0.5F);
poseStack.translate(0.0D, 0.0D, 500.0D);
poseStack.translate(0.0D, 0.0D, 750.0D);
MultiBufferSource.BufferSource multibuffersource$buffersource = MultiBufferSource.immediate(Tesselator.getInstance().getBuilder());
font.drawInBatch(text, x, y, color, true, poseStack.last().pose(), multibuffersource$buffersource, true, 0, 15728880, false);
multibuffersource$buffersource.endBatch();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public abstract class GuiGraphicsMixin {
)
)
private boolean disableBarInGui(boolean barVisible) {
return !KeyBind.ForgeClient.modEnabled;
return !KeyBind.ForgeClient.modEnabled && barVisible;
}

@Inject(
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ mandatory=true
versionRange="${minecraft_version_range}"
ordering="NONE"
side="BOTH"

[[mixins]]
config = "mixins.duradisplay.json"
2 changes: 1 addition & 1 deletion src/main/resources/assets/duradisplay/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"key.duradisplay.toggle_display":"Toggle",
"key.duradisplay.toggle_display":"Toggle DuraDisplay",
"key.duradisplay.misc":"DuraDisplay"
}

0 comments on commit ce10415

Please sign in to comment.