Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -66,21 +66,23 @@ private static MutableComponent anchorTextLongInner(VerticalAnchor anchor) {
return Component.literal(String.valueOf(absolute.y()));
} else if (anchor instanceof VerticalAnchor.AboveBottom aboveBottom) {
int offset = aboveBottom.offset();
int height = Minecraft.getInstance().level.getMinBuildHeight() + offset;
if (offset == 0) {
return Component.translatable("emi_ores.distribution.anchor.bottom");
return Component.translatable("emi_ores.distribution.anchor.bottom", height);
} else if (offset > 0) {
return Component.translatable("emi_ores.distribution.anchor.above_bottom", offset);
return Component.translatable("emi_ores.distribution.anchor.above_bottom", offset, height);
} else {
return Component.translatable("emi_ores.distribution.anchor.below_bottom", -offset);
return Component.translatable("emi_ores.distribution.anchor.below_bottom", -offset, height);
}
} else if (anchor instanceof VerticalAnchor.BelowTop belowTop) {
int offset = -belowTop.offset();
int height = Minecraft.getInstance().level.getMaxBuildHeight() + offset;
if (offset == 0) {
return Component.translatable("emi_ores.distribution.anchor.top");
return Component.translatable("emi_ores.distribution.anchor.top", height);
} else if (offset > 0) {
return Component.translatable("emi_ores.distribution.anchor.above_top", offset);
return Component.translatable("emi_ores.distribution.anchor.above_top", offset, height);
} else {
return Component.translatable("emi_ores.distribution.anchor.below_top", -offset);
return Component.translatable("emi_ores.distribution.anchor.below_top", -offset, height);
}
} else {
throw new RuntimeException();
Expand Down Expand Up @@ -169,6 +171,9 @@ protected static List<Component> getDistributionGraphTooltip(HeightProviderType
tooltip.add(Component.translatable("emi_ores.distribution.middle_range", anchorTextLong(midLow), anchorTextLong(midHigh)).withStyle(ChatFormatting.GRAY));
}
}
if (!(min instanceof VerticalAnchor.Absolute) || !(max instanceof VerticalAnchor.Absolute)) {
tooltip.add(Component.translatable("emi_ores.distribution.dimension", Minecraft.getInstance().level.dimension().location()).withStyle(ChatFormatting.GRAY));
}
return tooltip;
}

Expand Down
13 changes: 7 additions & 6 deletions xplat/src/main/resources/assets/emi_ores/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
"emi_ores.distribution.triangle": "Triangular height distribution",
"emi_ores.distribution.trapezoid": "Trapezoid height distribution",
"emi_ores.distribution.range": "From %s to %s",
"emi_ores.distribution.anchor.bottom": "the bottom of the world",
"emi_ores.distribution.anchor.above_bottom": "%s above bottom",
"emi_ores.distribution.anchor.below_bottom": "%s below bottom",
"emi_ores.distribution.anchor.top": "the top of the world",
"emi_ores.distribution.anchor.above_top": "%s above top",
"emi_ores.distribution.anchor.below_top": "%s below top",
"emi_ores.distribution.anchor.bottom": "the bottom of the world (%s)",
"emi_ores.distribution.anchor.above_bottom": "%s above bottom (%s)",
"emi_ores.distribution.anchor.below_bottom": "%s below bottom (%s)",
"emi_ores.distribution.anchor.top": "the top of the world (%s)",
"emi_ores.distribution.anchor.above_top": "%s above top (%s)",
"emi_ores.distribution.anchor.below_top": "%s below top (%s)",
"emi_ores.distribution.middle": "Most common at %s",
"emi_ores.distribution.middle_range": "Most common from %s to %s",
"emi_ores.distribution.dimension": "Parenthesized values are for current dimension only (%s)",

"tag.c.aquatic": "Aquatic",
"tag.c.aquatic_icy": "Icy Aquatic",
Expand Down