Skip to content

Commit

Permalink
feat: keep biome info
Browse files Browse the repository at this point in the history
Fixed #1
  • Loading branch information
return0927 committed May 17, 2024
1 parent 8d332bc commit 1b80e2a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Simplify F3 screen, remaining only coordinates and biome info


![](run/screenshots/2024-05-17_20.23.01.png)
![](run/screenshots/2024-05-17_20.23.06.png)
![](run/screenshots/2024-05-17_20.42.21.png)
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,25 @@ private void overrideLeftText(CallbackInfoReturnable<List<String>> cir) {
List<String> output = new ArrayList<>(cir.getReturnValue());
List<String> whitelist = List.of(
"XYZ:",
"Biome:"
"Biome:",
"Facing:"
);

output.removeIf(str -> whitelist.stream().noneMatch(str::startsWith));

for (int i = 0; i < output.size(); i++) {
String str = output.get(i);

if (str.startsWith("Facing:")) {
output.set(i,
(str.substring(0, str.indexOf(") (")) + ")")
.replace("Towards ", "")
.replace("positive ", "+")
.replace("negative ", "-")
);
}
}

cir.setReturnValue(output);
}

Expand Down

0 comments on commit 1b80e2a

Please sign in to comment.