diff --git a/build.gradle b/build.gradle index 3bfc84ed1e..5398173506 100644 --- a/build.gradle +++ b/build.gradle @@ -201,14 +201,14 @@ allprojects{ dependsOn clearCache options.forkOptions.jvmArgs += [ - '--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED', - '--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED', - '--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED', - '--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED', - '--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED', - '--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED', - '--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED', - '--add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED' + '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED', + '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED', + '--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED', + '--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED', + '--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED', + '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED', + '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED', + '--add-exports=java.base/sun.reflect.annotation=ALL-UNNAMED' ] } } @@ -338,7 +338,7 @@ project(":core"){ if(localArc() && debugged()) api arcModule("extensions:recorder") if(localArc()) api arcModule(":extensions:packer") - annotationProcessor 'com.github.Anuken:jabel:0.6.0' + annotationProcessor 'com.github.Anuken:jabel:0.9.0' compileOnly project(":annotations") kapt project(":annotations") } diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index 131e8b25ff..5f20b73550 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -524,7 +524,20 @@ public class ContentParser{ return item; }, ContentType.item, parser(ContentType.item, Item::new), - ContentType.liquid, parser(ContentType.liquid, Liquid::new), + ContentType.liquid, (TypeParser)(mod, name, value) -> { + Liquid liquid; + if(locate(ContentType.liquid, name) != null){ + liquid = locate(ContentType.liquid, name); + readBundle(ContentType.liquid, name, value); + }else{ + readBundle(ContentType.liquid, name, value); + liquid = make(resolve(value.getString("type", null), Liquid.class), mod + "-" + name); + value.remove("type"); + } + currentContent = liquid; + read(() -> readFields(liquid, value)); + return liquid; + }, ContentType.status, parser(ContentType.status, StatusEffect::new), ContentType.sector, (TypeParser)(mod, name, value) -> { if(value.isString()){ diff --git a/gradle.properties b/gradle.properties index 0eeb3fce98..dd42397641 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,17 +1,17 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m --illegal-access=permit \ ---add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \ ---add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \ ---add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED +--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \ +--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \ +--add-exports=java.base/sun.reflect.annotation=ALL-UNNAMED # Multithreaded kapt.use.worker.api=true