mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 23:01:03 +00:00
Merge pull request #151 from DJtheRedstoner/patch-mixin-ap
Fix mixin annotation processor issues
This commit is contained in:
@@ -19,7 +19,7 @@ fun Project.configureCompilation() {
|
|||||||
tasks.withType<JavaCompile> {
|
tasks.withType<JavaCompile> {
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
doFirst {
|
doFirst {
|
||||||
options.compilerArgs = mutableListOf("-Xlint:all")
|
options.compilerArgs.add("-Xlint:all")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ dependencies {
|
|||||||
|
|
||||||
configure<LoomGradleExtension> {
|
configure<LoomGradleExtension> {
|
||||||
accessWidener("src/main/resources/terra.accesswidener")
|
accessWidener("src/main/resources/terra.accesswidener")
|
||||||
|
refmapName = "terra.refmap.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
val remapped = tasks.register<RemapJarTask>("remapShadedJar") {
|
val remapped = tasks.register<RemapJarTask>("remapShadedJar") {
|
||||||
|
|||||||
+5
-4
@@ -13,16 +13,17 @@ import net.minecraft.world.dimension.DimensionOptions;
|
|||||||
import net.minecraft.world.dimension.DimensionType;
|
import net.minecraft.world.dimension.DimensionType;
|
||||||
import net.minecraft.world.gen.GeneratorOptions;
|
import net.minecraft.world.gen.GeneratorOptions;
|
||||||
import net.minecraft.world.gen.chunk.ChunkGeneratorSettings;
|
import net.minecraft.world.gen.chunk.ChunkGeneratorSettings;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
// Mixins commented out until loom fixes multi-project builds.
|
@Mixin(GeneratorOptions.class)
|
||||||
|
|
||||||
//@Mixin(GeneratorOptions.class)
|
|
||||||
public class MixinGeneratorOptions {
|
public class MixinGeneratorOptions {
|
||||||
//@Inject(method = "fromProperties(Lnet/minecraft/util/registry/DynamicRegistryManager;Ljava/util/Properties;)Lnet/minecraft/world/gen/GeneratorOptions;", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "fromProperties(Lnet/minecraft/util/registry/DynamicRegistryManager;Ljava/util/Properties;)Lnet/minecraft/world/gen/GeneratorOptions;", at = @At("HEAD"), cancellable = true)
|
||||||
private static void fromProperties(DynamicRegistryManager dynamicRegistryManager, Properties properties, CallbackInfoReturnable<GeneratorOptions> cir) {
|
private static void fromProperties(DynamicRegistryManager dynamicRegistryManager, Properties properties, CallbackInfoReturnable<GeneratorOptions> cir) {
|
||||||
if(properties.get("level-type") == null) {
|
if(properties.get("level-type") == null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"mappings": {
|
|
||||||
"com/dfsek/terra/fabric/mixin/GeneratorTypeAccessor": {
|
|
||||||
"VALUES": "field_25052:Ljava/util/List;",
|
|
||||||
"translationKey": "field_25060:Lnet/minecraft/class_2561;"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"data": {
|
|
||||||
"named:intermediary": {
|
|
||||||
"com/dfsek/terra/fabric/mixin/GeneratorTypeAccessor": {
|
|
||||||
"VALUES": "field_25052:Ljava/util/List;",
|
|
||||||
"translationKey": "field_25060:Lnet/minecraft/class_2561;"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
"package": "com.dfsek.terra.fabric.mixin",
|
"package": "com.dfsek.terra.fabric.mixin",
|
||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_8",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
"MixinGeneratorOptions"
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
"GeneratorTypeAccessor"
|
"GeneratorTypeAccessor"
|
||||||
|
|||||||
Reference in New Issue
Block a user