Skip to content

Commit

Permalink
Change to method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeronica committed Jan 23, 2024
1 parent 9a2a82c commit b8069f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/aeronicamc/mods/mxtune/MXTune.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public ItemStack makeIcon() {
}
};

public static boolean isDevEnv = !FMLEnvironment.production;
public static boolean isDevEnv() { return !FMLEnvironment.production; };

public MXTune()
{
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/aeronicamc/mods/mxtune/render/RenderEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static void event(RenderGameOverlayEvent.Post event)
final ITextComponent infoText = new StringTextComponent("").append(SheetMusicHelper.getFormattedMusicDuration(sheetMusic))
.append(String.format(" %s %s", mc.getSoundManager().getDebugString(), ClientAudio.getDebugString())).withStyle(TextFormatting.WHITE);

final int offset = Math.max(Math.max(mc.font.width(titleText), mc.font.width(MXTune.isDevEnv ? infoText : extraText)) + 40, width);
final int offset = Math.max(Math.max(mc.font.width(titleText), mc.font.width(MXTune.isDevEnv() ? infoText : extraText)) + 40, width);
final MatrixStack pPoseStack = event.getMatrixStack();

mc.getTextureManager().bind(TEXTURE);
Expand All @@ -181,10 +181,10 @@ public static void event(RenderGameOverlayEvent.Post event)
RenderHelper.blit(pPoseStack, offset - width + 10, 0, 10, 0, width, height);

mc.font.draw(pPoseStack, titleText, 30.0F, 7.0F, -11534256);
mc.font.draw(pPoseStack, MXTune.isDevEnv ? infoText : extraText, 30.0F, 17.0F, -11534256);
mc.font.draw(pPoseStack, MXTune.isDevEnv() ? infoText : extraText, 30.0F, 17.0F, -11534256);
mc.getItemRenderer().renderAndDecorateItem(itemStack, 8, 8);

if (MXTune.isDevEnv)
if (MXTune.isDevEnv())
{
final int[] posY = new int[1];
posY[0] = 25;
Expand Down

0 comments on commit b8069f7

Please sign in to comment.