ChaoticTrials / SkyblockBuilder

Let you create a custom skyblock island via config
https://modrinth.com/mod/skyblock-builder
Apache License 2.0
8 stars 6 forks source link

failed to load java.lang.IllegalStateException #43

Closed niemandvs closed 3 years ago

niemandvs commented 3 years ago

Versions

Minecraft: 1.16.5 Forge: 36.1.25 Skyblock Builder: skyblockbuilder-1.16.4-1.5.6.jar Modpack: not release

Describe the bug

How to reproduce

  1. start mod with minecraft forge version 36.1.25
  2. get error java.lang.IllegalStateException for skyblockbuilder

Expected behavior

Screenshots

crash-2021-06-07_07.59.53-fml.txt

MelanX commented 3 years ago

Please fill out everything. Otherwise I will close this.

niemandvs commented 3 years ago

Please fill out everything. Otherwise I will close this.

is there any info more i dont have modpack its a new creation by me to create starting island and so on

noeppi-noeppi commented 3 years ago

The problem is that you try to delete the old config even if it does not exist. The correct approach would be to use Files.deleteIfExists here. Also your should not throw an exception if it fails because some operating systems prevent deletion of files that are opened in another program (which in this case could be forge having the config file open). In that case I think it would be the best to just log that deletion of the file failed and maybe display a message to the player and tell him to delete the file manually.