liquid type support?

This commit is contained in:
Anuken
2022-06-11 11:20:15 -04:00
parent 4c8471c4a7
commit 523f94db98
3 changed files with 35 additions and 22 deletions

View File

@@ -201,14 +201,14 @@ allprojects{
dependsOn clearCache dependsOn clearCache
options.forkOptions.jvmArgs += [ options.forkOptions.jvmArgs += [
'--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED', '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED', '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED', '--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED', '--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED', '--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED', '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED', '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-opens=java.base/sun.reflect.annotation=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() && debugged()) api arcModule("extensions:recorder")
if(localArc()) api arcModule(":extensions:packer") 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") compileOnly project(":annotations")
kapt project(":annotations") kapt project(":annotations")
} }

View File

@@ -524,7 +524,20 @@ public class ContentParser{
return item; return item;
}, },
ContentType.item, parser(ContentType.item, Item::new), ContentType.item, parser(ContentType.item, Item::new),
ContentType.liquid, parser(ContentType.liquid, Liquid::new), ContentType.liquid, (TypeParser<Liquid>)(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.status, parser(ContentType.status, StatusEffect::new),
ContentType.sector, (TypeParser<SectorPreset>)(mod, name, value) -> { ContentType.sector, (TypeParser<SectorPreset>)(mod, name, value) -> {
if(value.isString()){ if(value.isString()){

View File

@@ -1,17 +1,17 @@
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m --illegal-access=permit \ org.gradle.jvmargs=-Xms256m -Xmx1024m --illegal-access=permit \
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \ --add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-opens=java.base/sun.reflect.annotation=ALL-UNNAMED --add-exports=java.base/sun.reflect.annotation=ALL-UNNAMED
# Multithreaded # Multithreaded
kapt.use.worker.api=true kapt.use.worker.api=true