Traveler's Backpack

Traveler's Backpack

32M Downloads

Index out of bounds (SwapTool), Error executing task on server

dennorske opened this issue ยท 5 comments

commented

I am running on mod version fabric-1.20.1-9.1.13 and fabric-api-0.92.1+1.20.1.jar
This issue is directly related to report in #820.

  1. Describe the bug
    Console prints out:
[23:01:35] [Server thread/ERROR]: Error executing task on Server
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 0
        at com.tiviacz.travelersbackpack.common.ServerActions.swapTool(ServerActions.java:68) ~[travelersbackpack-fabric-1.20.1-9.1.13.jar:?]
        at com.tiviacz.travelersbackpack.init.ModNetwork.lambda$initServer$7(ModNetwork.java:144) ~[travelersbackpack-fabric-1.20.1-9.1.13.jar:?]
        at net.minecraft.class_3738.run(class_3738.java:18) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[server-intermediary.jar:?]
        at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:782) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:164) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:764) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:758) ~[server-intermediary.jar:?]
        at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:742) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:675) ~[server-intermediary.jar:?]
        at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265) ~[server-intermediary.jar:?]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
  1. Write steps to reproduce the bug
    Not sure how to replicate it, but trying to swap tool without any tools in the backpack is a probable reason. I have not had a chance to test this.
commented
commented

Thank you very much! And is it being fixed going back on 1.20.1 as well (fabric/forge)? ๐ŸฆŠ

commented

Thank you very much! And is it being fixed going back on 1.20.1 as well (fabric/forge)? ๐ŸฆŠ

Thank you very much! And is it being fixed going back on 1.20.1 as well (fabric/forge)? ๐ŸฆŠ

So sorry for late reply I didn't see the message, yes it is going to be fixed as well

commented

Fixed for Fabric too, forgot to send message