Skip to content

Bump OpenInv runtime dependency up to at least 5.1.7#20

Open
FireInstall wants to merge 1 commit intoMinebench:masterfrom
GreenSurvivors:upstreamOpenInv
Open

Bump OpenInv runtime dependency up to at least 5.1.7#20
FireInstall wants to merge 1 commit intoMinebench:masterfrom
GreenSurvivors:upstreamOpenInv

Conversation

@FireInstall
Copy link
Copy Markdown
Contributor

Since OpenInv 5.1.7, the plugin automatically sets the player to the respawn location (position, pitch, yaw, world) of the server.
The current implementation of the applyData method did miss this change made in 1.21.9 where the Location can be set in every world and may send the player to the wrong place!

This lets us drop some code, like creating a new world (the server always needs an "overworld" to store the player data and won't start without it), and OpenInv will ensure the player will get set to the correct location.

The player .dat file needs to not be empty, but as it current stands (1.20.6 up to 26.1.1) it doesn't need to contain any valid tags.
However; while never versions will quietly drop junk data, older minecraft versions will not. So I opted for the unused brain system as it remains unused for players.

OpenInv 5.1.7 needs at least Minecraft version 1.21.4, but 5.1.9 to 5.3.0 backported to 1.21.1.

Note: OpenInv 5.1.7 restructured the build process and currently does NOT publish anything else than it's api to maven. Since nothing, we access directly, did change it's fine to compile against an older version, but runtime will fail when only an older version is present!

…ecraft version to 1.21.1

This in turn lets us drop setting the Location of offline players who never played on the server before.
Openinv will safely set them to the spawn location of the server wherever that may be (com.lishid.openinv.internal.common.player.PlayerManager#spawnInDefaultWorld)
Note: OpenInv restructured its building process in the very same version. And currently isn't able to publish anything other than it's API automatically to a maven repo.
Internally everything we do access directly remains unchanged, so it's fine to keep the compile time version
Note: For future reference, a player .dat needs at least one tag, it doesn't need to be valid. However, older minecraft versions will keep junk data. So I opted for the player unused brain system. Any tag without impact will do, really. Adding a DataVersion tag potentially will run the DFU and may print messages in the console but also should be fine to use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant