Skip to content

Fix FluidIngredient::toJson#4714

Merged
TarLaboratories merged 1 commit intoGregTechCEu:1.20.1from
Mqrius:fluids-3
Apr 17, 2026
Merged

Fix FluidIngredient::toJson#4714
TarLaboratories merged 1 commit intoGregTechCEu:1.20.1from
Mqrius:fluids-3

Conversation

@Mqrius
Copy link
Copy Markdown
Contributor

@Mqrius Mqrius commented Mar 5, 2026

What

FluidIngredient::toJson had code to output either a single value, or an array of values, depending on what's in FluidIngredient.values. However, a missing else means it would always output an array.

Implementation Details

Put the array code inside an else

Outcome

Output json is a single value or an array as expected

How Was This Tested

Game compiles and runs

Additional Information

The fromJson already correctly handles the two cases

Potential Compatibility Issues

If any external code uses FluidIngredient::toJson and always expects an array, this change would break their code.
An alternative to this PR would be to explicitly always return an array.

@Mqrius Mqrius requested a review from a team as a code owner March 5, 2026 14:50
@github-actions github-actions bot added the 1.20.1 label Mar 5, 2026
@TarLaboratories TarLaboratories added type: bugfix General bug fixes Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. labels Apr 10, 2026
@TarLaboratories TarLaboratories merged commit 9bdf60f into GregTechCEu:1.20.1 Apr 17, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. type: bugfix General bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants