![Traveler's Backpack [Fabric]](https://media.forgecdn.net/avatars/thumbnails/623/756/256/256/638018179443585069_animated.gif)
Crash when loading world after `/clear` with backpack with tank equipped.
Trung0246 opened this issue ยท 2 comments
Version: Fabric 1.21.1
- Describe the bug
Got IndexOutOfBoundsException
when attempting to world load:
java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
at java.base/java.util.Objects.checkIndex(Objects.java:385)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at knot//com.tiviacz.travelersbackpack.item.HoseItem.getHoseTank(HoseItem.java:399)
at knot//com.tiviacz.travelersbackpack.client.screens.HudOverlay.renderOverlay(HudOverlay.java:66)
at knot//net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback.lambda$static$0(HudRenderCallback.java:28)
at knot//net.minecraft.class_329.handler$ekl000$fabric-rendering-v1$render(class_329.java:10538)
at knot//net.minecraft.class_329.method_1753$mixinextras$wrapped$267(class_329.java:220)
at knot//net.minecraft.class_329.mixinextras$bridge$method_1753$mixinextras$wrapped$267$268(class_329.java)
at knot//net.minecraft.class_329.wrapMethod$gid000$iris$handleHudHidingScreens(class_329.java:14548)
at knot//net.minecraft.class_329.method_1753(class_329.java)
at knot//net.minecraft.class_757.mixinextras$bridge$method_1753$342(class_757.java)
at knot//net.minecraft.class_757.wrapOperation$gec000$immediatelyfast$hudBatching(class_757.java:9590)
at knot//net.minecraft.class_757.method_3192(class_757.java:896)
at knot//net.minecraft.class_310.method_1523(class_310.java:1285)
at knot//net.minecraft.class_310.method_1514(class_310.java:882)
at knot//net.minecraft.client.main.Main.main(Main.java:256)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:243)
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:278)
at org.multimc.EntryPoint.listen(EntryPoint.java:143)
at org.multimc.EntryPoint.main(EntryPoint.java:34)
- Write steps to reproduce the bug
Potentially not the root cause but this is what I did beforehand:
- Equip backpack with tank upgrade enabled and holding hose.
- Run
/clear
. - Create new backpack with tank and equip it.
- Leave the world and exit the game.
- Open the game again.
- Join the same world.
- Crash.
- What is expected behavior:
The game should not crash when having world load.
Seems like the crash is caused by hose in your hand. What is really strange because I make checks before accessing the hose data if it's initialized... also I cant reproduce this but I will make more checks to avoid this in the next update