chronosacaria / MCDungeonsWeapons

Bringing the weapons and tools of Minecraft Dungeons to Minecraft
Other
66 stars 25 forks source link

Fix total config collapse on improper update #275

Closed fzzyhmstrs closed 2 months ago

fzzyhmstrs commented 2 months ago

Resolves the numerous issues here and in the discord of the update causing all MCDW weapons to vanish.

Accomplishes this by adding "dummy" values to the various "____Stats" classes. Doing this seems to appease Jankson, and allows for the config generation to actually go through.

Behavior 9.0.1 -> 9.0.2: If configs aren't updated, all weapons fail to register (because they are "disabled"), all weapons in players inventories vanish permanently. Behavior 9.0.1 -> 9.0.3: Config updates with the isEnabled flags, registry is maintained, and items stay intact.

fzzyhmstrs commented 2 months ago

Also I recommend adding a pull request template. It felt a little cheeky to do so on a PR itself, but a simple example can be found in Fzzy Config source: https://github.com/fzzyhmstrs/fconfig/blob/master/.github/pull_request_template.md. Importantly, this notifies the PR-maker that they are agreeing to be bound by the terms of the softwares license (the TDL in this case)