Reformat code

This commit is contained in:
Zoë Gidiere
2023-11-02 18:47:36 -06:00
parent d696e4fd24
commit 81a96d6b76
224 changed files with 1156 additions and 1075 deletions
+11 -11
View File
@@ -12,19 +12,19 @@ architectury {
dependencies {
annotationProcessor("net.fabricmc:sponge-mixin:${Versions.Mod.mixin}")
annotationProcessor("dev.architectury:architectury-loom:${Versions.Mod.architecuryLoom}")
shadedApi(project(":common:implementation:base"))
"forgeRuntimeLibrary"(project(":common:implementation:base"))
implementation(project(path = ":platforms:mixin-common", configuration = "namedElements")) { isTransitive = false }
"developmentForge"(project(path = ":platforms:mixin-common", configuration = "namedElements")) { isTransitive = false }
shaded(project(path = ":platforms:mixin-common", configuration = "transformProductionForge")) { isTransitive = false }
forge(group = "net.minecraftforge", name = "forge", version = Versions.Forge.forge)
minecraft("com.mojang:minecraft:${Versions.Mod.minecraft}")
mappings("net.fabricmc:yarn:${Versions.Mod.yarn}:v2")
//forge is not ok.
compileOnly("org.burningwave:core:${Versions.Forge.burningwave}")
"forgeRuntimeLibrary"("org.burningwave:core:${Versions.Forge.burningwave}")
@@ -32,11 +32,11 @@ dependencies {
loom {
accessWidenerPath.set(project(":platforms:mixin-common").file("src/main/resources/terra.accesswidener"))
mixin {
defaultRefmapName.set("terra.forge.refmap.json")
}
// launches {
// named("client") {
// property("fabric.log.level", "info")
@@ -47,7 +47,7 @@ loom {
// property("mixin.env.disableRefMap", "true")
// }
// }
forge {
convertAccessWideners.set(true)
mixinConfig("terra.common.mixins.json")
@@ -66,11 +66,11 @@ tasks {
mapOf(
"Implementation-Title" to rootProject.name,
"Implementation-Version" to project.version,
)
)
)
)
}
}
remapJar {
inputFile.set(shadowJar.get().archiveFile)
archiveFileName.set("${rootProject.name.capitalize()}-forge-${project.version}.jar")
@@ -122,14 +122,14 @@ public final class AwfulForgeHacks {
.getLocation()
.toURI()
.getPath();
cl.addURL(new URL("jar:file:" + pathToJar + "!/"));
Class newClassLoad = Class.forName(name, true, cl);
omegaCL.loadOrDefine(newClassLoad, AbstractPlatform.class.getClassLoader());
} catch(ClassNotFoundException | URISyntaxException | IOException ex) {
throw new RuntimeException(ex);
}
}
});
} catch(IOException e) {
@@ -26,7 +26,8 @@ public class NoiseConfigMixin {
@Inject(method = "<init>(Lnet/minecraft/world/gen/chunk/ChunkGeneratorSettings;Lnet/minecraft/registry/RegistryEntryLookup;J)V",
at = @At("TAIL"))
private void mapMultiNoise(ChunkGeneratorSettings chunkGeneratorSettings, RegistryEntryLookup<NoiseParameters> noiseParametersLookup, long seed,
private void mapMultiNoise(ChunkGeneratorSettings chunkGeneratorSettings, RegistryEntryLookup<NoiseParameters> noiseParametersLookup,
long seed,
CallbackInfo ci) {
SeedHack.register(multiNoiseSampler, seed);
}
@@ -61,7 +61,8 @@ public final class BiomeUtil {
VanillaBiomeProperties vanillaBiomeProperties = biome.getContext().get(VanillaBiomeProperties.class);
net.minecraft.world.biome.Biome minecraftBiome = MinecraftUtil.createBiome(biome,
ForgeRegistries.BIOMES.getDelegateOrThrow(vanilla.getKey().orElseThrow())
ForgeRegistries.BIOMES.getDelegateOrThrow(
vanilla.getKey().orElseThrow())
.value(),
vanillaBiomeProperties);
@@ -82,7 +83,8 @@ public final class BiomeUtil {
Objects.requireNonNullElse(vanillaBiomeProperties.getVillagerType(),
villagerMap.getOrDefault(vanilla.getKey().orElseThrow(), VillagerType.PLAINS)));
MinecraftUtil.TERRA_BIOME_MAP.computeIfAbsent(vanilla.getKey().orElseThrow().getValue(), i -> new ArrayList<>()).add(identifier);
MinecraftUtil.TERRA_BIOME_MAP.computeIfAbsent(vanilla.getKey().orElseThrow().getValue(), i -> new ArrayList<>()).add(
identifier);
}
}
}