Skip to content

Commit

Permalink
Fix recipe properties offsetting info text too much (GregTechCEu#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
loxoDev authored Jan 29, 2024
1 parent 36d1507 commit 9a7ac23
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public void drawInfo(@NotNull Minecraft minecraft, int x, int y, int color, Obje
minecraft.fontRenderer.drawString(I18n.format("gregtech.recipe.cleanroom", getName(type)), x, y, color);
}

@Override
public int getInfoHeight(Object value) {
CleanroomType type = castValue(value);
if (type == null) return 0;
return super.getInfoHeight(value);
}

@NotNull
private static String getName(@NotNull CleanroomType value) {
String name = I18n.format(value.getTranslationKey());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public static PrimitiveProperty getInstance() {
@Override
public void drawInfo(Minecraft minecraft, int x, int y, int color, Object value) {}

@Override
public int getInfoHeight(Object value) {
return 0;
}

@Override
public boolean hideTotalEU() {
return true;
Expand Down

0 comments on commit 9a7ac23

Please sign in to comment.