Skip to content

Do not set gamerule during conversion when it was not set prior#29

Merged
Spottedleaf merged 1 commit into
PaperMC:masterfrom
chickeneer:convertInt-v4658
Dec 31, 2025
Merged

Do not set gamerule during conversion when it was not set prior#29
Spottedleaf merged 1 commit into
PaperMC:masterfrom
chickeneer:convertInt-v4658

Conversation

@chickeneer
Copy link
Copy Markdown
Contributor

@chickeneer chickeneer commented Dec 31, 2025

In V4658.java - There is a (correct) data converter for the experimental gamerule max_minecart_speed. Since it is only experimental, most servers do not even have this value set yet.

convertInt(gameRules, "minecartMaxSpeed", "minecraft:max_minecart_speed");

The problem is that the convertInt method sets an empty string as the value

Causing the following server error log when loading a world that does not have this gamerule set in its world files.
[22:09:35 WARN]: Not a number missed input: {"minecraft:max_minecart_speed":""}
Inspecting the level.dat prior to running it through a 1.21.11 server shows that this gamerule was never set. So the dataconversion introduced the erroneous error when the server loads the world's gamerules.

@Spottedleaf
Copy link
Copy Markdown
Member

The original problem is actually whether the field was set. You should adjust all of the convert functions so that they avoid writing any value unless the original field is present.

@chickeneer
Copy link
Copy Markdown
Contributor Author

I can make that adjustment. 👍 I would agree

@chickeneer chickeneer changed the title Do not set empty string when converting int gamerules Do not set set gamerule during conversion when it was not set prior Dec 31, 2025
@Spottedleaf Spottedleaf changed the title Do not set set gamerule during conversion when it was not set prior Do not set gamerule during conversion when it was not set prior Dec 31, 2025
@Spottedleaf Spottedleaf merged commit 5027bd3 into PaperMC:master Dec 31, 2025
Spottedleaf pushed a commit to PaperMC/Paper that referenced this pull request Dec 31, 2025
See PaperMC/DataConverter#29

Note that this is just a sync from DataConverter, as we do not
make use of the LEVEL data type for converting (we use DFU).
b0ykoe pushed a commit to InfernalSuite/AdvancedSlimePaper that referenced this pull request Dec 31, 2025
…113a3bbff9

Do not set gamerules when they are not set before conversion

See PaperMC/DataConverter#29

Note that this is just a sync from DataConverter, as we do not
make use of the LEVEL data type for converting (we use DFU).
Y2Kwastaken pushed a commit to Y2Kwastaken/Paper that referenced this pull request Feb 4, 2026
See PaperMC/DataConverter#29

Note that this is just a sync from DataConverter, as we do not
make use of the LEVEL data type for converting (we use DFU).
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.

2 participants