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

Crash on hovering an item from Alloygery #25

Open
kathibeepboop opened this issue Aug 1, 2023 · 0 comments
Open

Crash on hovering an item from Alloygery #25

kathibeepboop opened this issue Aug 1, 2023 · 0 comments

Comments

@kathibeepboop
Copy link

Issue on this line

tooltip.set(EAUtil.lineContainsString(tooltip, I18n.get("enhancedarmaments.misc.pos.mainHand")) + 2, Component.literal(rarity.getColor() + " " + d + ChatFormatting.GRAY + " " + I18n.get("enhancedarmaments.misc.tooltip.attackdamage")));

This line gives us the following crash

java.lang.IndexOutOfBoundsException: Index 5 out of bounds for length 5
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
	at java.base/java.util.Objects.checkIndex(Objects.java:359)
	at java.base/java.util.ArrayList.set(ArrayList.java:441)
	at nova.committee.enhancedarmaments.init.handler.ItemTooltipEventHandler.changeTooltips(ItemTooltipEventHandler.java:107)
	at nova.committee.enhancedarmaments.init.handler.ItemTooltipEventHandler.lambda$addInformation$0(ItemTooltipEventHandler.java:47)
	at nova.committee.enhancedarmaments.init.callback.ItemTooltipCallback.lambda$static$0(ItemTooltipCallback.java:23)
	at net.minecraft.class_1799.handler$cpm000$enhancedarmaments$tooltipLines(class_1799.java:6654)
	at net.minecraft.class_1799.method_7950(class_1799.java:835)
	at net.minecraft.class_437.method_25408(class_437.java:181)
	at net.minecraft.class_437.method_25409(class_437.java:168)
	at net.minecraft.class_465.method_2380(class_465.java:189)
	at net.minecraft.class_479.method_25394(class_479.java:68)
	at net.minecraft.class_757.method_3192(class_757.java:881)
	at net.minecraft.class_310.method_1523(class_310.java:1177)
	at net.minecraft.class_310.method_1514(class_310.java:768)
	at net.minecraft.client.main.Main.method_44604(Main.java:244)
	at net.minecraft.client.main.Main.main(Main.java:51)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

Any idea how to fix it?

Steps to reproduce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant