GTNewHorizons / GT-New-Horizons-Modpack

New Modpack with Gregtech, Thaumcraft and Witchery
https://www.gtnewhorizons.com/
Other
963 stars 297 forks source link

CraftTweaker cannot parse ZenScripts after build script change #9210

Closed bombcar closed 2 years ago

bombcar commented 2 years ago

Your GTNH Discord Username

bombcar#1042

Your Pack Version

2.1.2.1pre

Your Server

SP

Type of Server

Single Player

Your Actions

Try to use the new CraftTweaker after the build-script changes were merged

Absolutely none of the zscripts parse, throwing errors all over the place.

After investigation and checking, it comes down to (at least, perhaps others) ClassRegistry.class - which is 4k in the "working" version and 500b in the "broken" version.

They decompile similarly - but! od -a reveals more:

minetweaker/expand/ExpandStringminetweaker/expand/ExpandBool"minetweaker/expand/ExpandItemStack!minetweaker/expand/ExpandAnyArrayminetweaker/expand/ExpandFloatminetweaker/expand/ExpandShortminetweaker/expand/ExpandDoubleminetweaker/expand/ExpandByteminetweaker/expand/ExpandLongminetweaker/expand/ExpandInt!minetweaker/runtime/ITweaker#*minetweaker/api/tooltip/IngredientTooltips%!minetweaker/api/chat/IChatMessage'minetweaker/api/util/Position3f)(minetweaker/api/entity/I

It's dynamically generated via RegisterZenClassesTask.java https://github.com/GTNewHorizons/CraftTweaker/blob/5044de32dd9fa11ebf98034dce68aab0062094dd/buildSrc/src/main/java/minetweaker/tasks/RegisterZenClassesTask.java which apparently didn't survive the migration - and so now files like https://github.com/GTNewHorizons/CraftTweaker/blob/master/src/main/java/minetweaker/ClassRegistry.java get created empty and it explodes.

I don't know how to migrate this to the new build script; custom code-generation code is tricky

Crash Report

[Uploading fml-client-latest-2.log…]()

Final Checklist

bombcar commented 2 years ago

ClassRegistry.class-old-working-4k.txt ClassRegistry.class.new-broken-500b.txt

My decompiler doesn't see much of a difference, but there's clearly additional data in the first one.