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

Mod Incompatibility with Firmaments Item list #258

Closed
nea89o opened this issue Aug 27, 2023 · 0 comments · Fixed by #259
Closed

Mod Incompatibility with Firmaments Item list #258

nea89o opened this issue Aug 27, 2023 · 0 comments · Fixed by #259
Labels
bug Something isn't working

Comments

@nea89o
Copy link

nea89o commented Aug 27, 2023

What happened?

Crashes when viewing a drill item that does not have color codes removed from its lore. Also considering that other mods may modify the lore as returned by Item.getTooltip, maybe it is worth it to manually parse the display.Lore nbt data in ItemUtils. This happened with firmaments item list, but I am not totally unsure that this crash will happen without firmament.

Screenshots

No response

Log output

https://mclo.gs/L0jUTlN

Minecraft Version

1.20

Skyblocker Version

still in commit 301f40c

Additional context

for (String line : ItemUtils.getTooltipStrings(stack)) {
if (line.contains("Fuel: ")) {
String clear = Pattern.compile("[^0-9 /]").matcher(line).replaceAll("").trim();
String[] split = clear.split("/");
current = Integer.parseInt(split[0]);
max = Integer.parseInt(split[1]) * 1000;
break;
}
}
crashes on a line like: `§7Fuel: §23,000§8/3k"

@nea89o nea89o added the bug Something isn't working label Aug 27, 2023
LifeIsAParadox added a commit to LifeIsAParadox/Skyblocker that referenced this issue Aug 28, 2023
- make the code more readable
- fix SkyblockerMod#258 (remove legacy code from line)
- add durability bar for Pickonimbus
kevinthegreat1 pushed a commit that referenced this issue Aug 31, 2023
- make the code more readable
- fix #258 (remove legacy code from line)
- add durability bar for Pickonimbus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant