TeamChocoQuest / ChocolateQuestRepoured

ChocolateQuest Re-poured!
Other
75 stars 25 forks source link

Error when spawning a structure with a name that is less than or equal to 3 characters #312

Closed judgekreep closed 2 years ago

judgekreep commented 2 years ago

General Information To check a checkbox: Insert a X between the square brackets, you need to remove the space though.

Describe the bug Spawn a structure with a name that is less than or equal to 3 characters. The structure can be naturally spawned or via creative. Leave the world and re-enter... and crash:

Description: Exception in server tick loop

java.lang.StringIndexOutOfBoundsException: String index out of range: 4 at java.lang.String.substring(String.java:1951) at team.cqr.cqrepoured.structuregen.DungeonDataManager.readData(DungeonDataManager.java:174) at team.cqr.cqrepoured.structuregen.DungeonDataManager.handleWorldLoad(DungeonDataManager.java:88) at team.cqr.cqrepoured.util.handlers.EventsHandler.onWorldLoad(EventsHandler.java:195) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_41_EventsHandler_onWorldLoad_Load.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraft.server.integrated.IntegratedServer.func_71247_a(IntegratedServer.java:132) at net.minecraft.server.integrated.IntegratedServer.func_71197_b(IntegratedServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) at java.lang.Thread.run(Thread.java:745)

Deleting the structures.nbt file within the world/data/CQR folder fixes the problem.

Meldexun commented 2 years ago

Please make use of the issue template and upload the complete log to a paste site instead of just posting a part of it.

Meldexun commented 2 years ago

Will be fixed with the next release.

DerToaster98 commented 2 years ago

fixed in v2.6.3B