Implement Float Property Truncation Fix plugin and fix finalizeBuild being consumed#12
Implement Float Property Truncation Fix plugin and fix finalizeBuild being consumed#12outercloudstudio wants to merge 4 commits intodevfrom
Conversation
|
|
|
@outercloudstudio I think it might be good to move the custom json.stringify replacer into commonutils and expose it to other extensions. Something like a json minifier compiler plugin might yeet the |
|
Good Idea 👍 |
|
I think what I can do here, is provide the exact json to string functionality that the extension provides, then also add the spacing options the vanilla JSON.toString provides. In this case of minification, it'll either need to operate on this string or provide its own correction behavior. |
|
@ThomasOrs I've exposed the function and made it customizable. Let me know if this looks good. See the example usage. |
|
Publishing current progress as 0.13.0-beta for testing. |
Fixes the issue where float properties would be saved by the compiler like this:
While minecraft expected the values to end with a .0.
This optional built in plugin fixes this specific case to instead result in
This plugin is built in as
floatPropertyTruncationFixand can be used likeThis would fix
#1162
Update (Added utility for custom compiler extensions to call)
Example usage: