SpongePowered / Sponge

The SpongeAPI implementation targeting vanilla Minecraft and 3rd party platforms.
MIT License
383 stars 210 forks source link

Plugin packs are incorrectly loaded #4064

Closed pandier closed 2 months ago

pandier commented 2 months ago

Affected Product(s)

SpongeVanilla

Version

1.20.6-11.0.1-RC1707

Operating System

Linux (Fedora 40)

Java Version

openjdk 21.0.3

Plugins/Mods

- Custom plugin (see bug details)

Describe the bug

When a plugin contains any data/assets resources (data/minecraft/dimension/overworld.json in my case) the server fails to load with a StringIndexOutOfBoundsException: Range [x, y) out of bounds for length n (x, y, n depending on the path of the resource). The resource can be located at any path as long as it's inside a valid namespace (data/minecraft/doesnotmatter/atall.json also fails to load)

Reproducing

  1. Create a new sponge plugin
  2. Add data/minecraft/dimension/overworld.json with any data (doesn't matter) to plugin resources
  3. Run SpongeVanilla with the plugin

Link to logs

https://paste.gg/p/anonymous/017c5a63cfee4ee190a8900761d7d065