hannibal002 / SkyHanni

SkyHanni is a Minecraft Mod for Hypixel SkyBlock.

Home Page:https://discord.gg/skyhanni-997079228510117908

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash When Opening Visitor Inventory

hannibal002 opened this issue · comments

Causes an error or crash because the visitorRarities in GardenVisitorDropStatistics list is not yet loaded.
It can be fixed by replacing all local fields in GardenVisitorDropStatistics with direct config associations.
I (hannibal) will do that once #160 is merged (to avoid merge conflicts)

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
	at java.util.ArrayList.get(ArrayList.java:429)
	at at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorDropStatistics.drawVisitorStatsDisplay(GardenVisitorDropStatistics.kt:96)
	at at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorDropStatistics.saveAndUpdate(GardenVisitorDropStatistics.kt:153)
	at at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorFeatures.onStackClick(GardenVisitorFeatures.kt:233)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_557_GardenVisitorFeatures_onStackClick_SlotClickEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:49)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140)
	at io.github.moulberry.notenoughupdates.events.NEUEvent.post(NEUEvent.java:27)
	at net.minecraft.client.gui.inventory.GuiContainer.handler$beb000$handleMouseClick(GuiContainer.java:4573)
	at net.minecraft.client.gui.inventory.GuiContainer.func_146984_a(GuiContainer.java)
	at net.minecraft.client.gui.inventory.GuiContainer.func_73864_a(GuiContainer.java:388)
	at net.minecraft.client.gui.GuiScreen.func_146274_d(GuiScreen.java:555)

Workaround: wait a couple of seconds when joining garden before talking to the visitor

fixed