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

Fix recipe properties offsetting info text too much #2360

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
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
Loading