diff --git a/build.gradle b/build.gradle index 50c3291..3eb19a2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1702141377 +//version: 1704751096 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -31,8 +31,7 @@ buildscript { maven { // GTNH RetroFuturaGradle and ASM Fork name "GTNH Maven" - url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" - allowInsecureProtocol = true + url "https://nexus.gtnewhorizons.com/repository/public/" } mavenLocal() } @@ -49,12 +48,12 @@ plugins { id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle id 'com.github.johnrengelman.shadow' version '8.1.1' apply false id 'com.palantir.git-version' version '3.0.0' apply false - id 'de.undercouch.download' version '5.4.0' + id 'de.undercouch.download' version '5.5.0' id 'com.github.gmazzo.buildconfig' version '3.1.0' apply false // Unused, available for addon.gradle id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version id 'com.modrinth.minotaur' version '2.+' apply false id 'com.matthewprenger.cursegradle' version '1.4.0' apply false - id 'com.gtnewhorizons.retrofuturagradle' version '1.3.26' + id 'com.gtnewhorizons.retrofuturagradle' version '1.3.27' } print("You might want to check out './gradlew :faq' if your build fails.\n") @@ -118,7 +117,7 @@ propertyDefaultIfUnset("forceEnableMixins", false) propertyDefaultIfUnset("channel", "stable") propertyDefaultIfUnset("mappingsVersion", "12") propertyDefaultIfUnset("usesMavenPublishing", true) -propertyDefaultIfUnset("mavenPublishUrl", "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases") +propertyDefaultIfUnset("mavenPublishUrl", "https://nexus.gtnewhorizons.com/repository/releases/") propertyDefaultIfUnset("modrinthProjectId", "") propertyDefaultIfUnset("modrinthRelations", "") propertyDefaultIfUnset("curseForgeProjectId", "") @@ -573,13 +572,15 @@ afterEvaluate { repositories { maven { - name 'Overmind forge repo mirror' - url 'https://gregtech.overminddl1.com/' + name = "GTNH Maven" + url = "https://nexus.gtnewhorizons.com/repository/public/" + // Links for convenience: + // Simple HTML browsing: https://nexus.gtnewhorizons.com/service/rest/repository/browse/releases/ + // Rich web UI browsing: https://nexus.gtnewhorizons.com/#browse/browse:releases } maven { - name = "GTNH Maven" - url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" - allowInsecureProtocol = true + name 'Overmind forge repo mirror' + url 'https://gregtech.overminddl1.com/' } maven { name 'sonatype' @@ -785,7 +786,7 @@ dependencies { java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}") } if (modId != 'hodgepodge') { - java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35') + java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.4.4') } java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false} @@ -960,8 +961,7 @@ if (usesShadowedDependencies.toBoolean()) { configurations.runtimeElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar)) configurations.apiElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar)) tasks.named("jar", Jar) { - enabled = false - finalizedBy(tasks.shadowJar) + archiveClassifier.set('dev-preshadow') } tasks.named("reobfJar", ReobfuscatedJar) { inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile})) @@ -970,11 +970,6 @@ if (usesShadowedDependencies.toBoolean()) { javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) { skip() } - for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) { - tasks.named(runTask).configure { - dependsOn("shadowJar") - } - } } ext.publishableDevJar = usesShadowedDependencies.toBoolean() ? tasks.shadowJar : tasks.jar ext.publishableObfJar = tasks.reobfJar @@ -1178,7 +1173,7 @@ publishing { if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) { maven { url = mavenPublishUrl - allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven + allowInsecureProtocol = mavenPublishUrl.startsWith("http://") credentials { username = System.getenv("MAVEN_USER") ?: "NONE" password = System.getenv("MAVEN_PASSWORD") ?: "NONE" diff --git a/src/main/java/com/colen/postea/Postea.java b/src/main/java/com/colen/postea/Postea.java index 40db775..356877d 100644 --- a/src/main/java/com/colen/postea/Postea.java +++ b/src/main/java/com/colen/postea/Postea.java @@ -1,9 +1,11 @@ package com.colen.postea; +import net.minecraftforge.common.MinecraftForge; + import com.colen.postea.checker.PosteaProcessedChunksWorldSavedData; + import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.common.MinecraftForge; @Mod(modid = Tags.MODID, version = Tags.VERSION, name = Tags.MODNAME, acceptedMinecraftVersions = "[1.7.10]") @SuppressWarnings("unused") diff --git a/src/main/java/com/colen/postea/Utility/ChunkFixerUtility.java b/src/main/java/com/colen/postea/Utility/ChunkFixerUtility.java index 8a9f94f..3708314 100644 --- a/src/main/java/com/colen/postea/Utility/ChunkFixerUtility.java +++ b/src/main/java/com/colen/postea/Utility/ChunkFixerUtility.java @@ -5,7 +5,6 @@ import java.util.List; import java.util.function.BiFunction; import java.util.stream.Collectors; -import com.colen.postea.checker.PosteaProcessedChunksWorldSavedData; import net.minecraft.block.Block; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -13,11 +12,13 @@ import net.minecraft.world.World; import com.colen.postea.API.BlockReplacementManager; import com.colen.postea.API.TileEntityReplacementManager; +import com.colen.postea.checker.PosteaProcessedChunksWorldSavedData; import akka.japi.Pair; import cpw.mods.fml.common.registry.GameRegistry; public class ChunkFixerUtility { + public static void processChunkNBT(NBTTagCompound compound, World world) { NBTTagCompound level = compound.getCompoundTag("Level"); int x = level.getInteger("xPos"); @@ -30,7 +31,6 @@ public class ChunkFixerUtility { } - private static void transformNormalBlocks(NBTTagCompound compound, World world) { NBTTagCompound level = compound.getCompoundTag("Level"); NBTTagList sections = level.getTagList("Sections", 10); diff --git a/src/main/java/com/colen/postea/Utility/PosteaUtilities.java b/src/main/java/com/colen/postea/Utility/PosteaUtilities.java index 77c86b2..996a310 100644 --- a/src/main/java/com/colen/postea/Utility/PosteaUtilities.java +++ b/src/main/java/com/colen/postea/Utility/PosteaUtilities.java @@ -1,13 +1,14 @@ package com.colen.postea.Utility; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.ModContainer; -import net.minecraft.nbt.NBTTagCompound; - import java.util.ArrayList; import java.util.Collections; import java.util.Objects; +import net.minecraft.nbt.NBTTagCompound; + +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.ModContainer; + public abstract class PosteaUtilities { @SuppressWarnings("unused") @@ -27,7 +28,6 @@ public abstract class PosteaUtilities { return tagCompound; } - public static int getModListHash() { // We iterate over every mod, get its version and put it into a giant list. @@ -36,7 +36,8 @@ public abstract class PosteaUtilities { ArrayList modList = new ArrayList<>(); - for (ModContainer mod : Loader.instance().getActiveModList()) { + for (ModContainer mod : Loader.instance() + .getActiveModList()) { modList.add(mod.getModId() + ":" + mod.getVersion()); } diff --git a/src/main/java/com/colen/postea/checker/PosteaProcessedChunksWorldSavedData.java b/src/main/java/com/colen/postea/checker/PosteaProcessedChunksWorldSavedData.java index f6ac7f5..56aa026 100644 --- a/src/main/java/com/colen/postea/checker/PosteaProcessedChunksWorldSavedData.java +++ b/src/main/java/com/colen/postea/checker/PosteaProcessedChunksWorldSavedData.java @@ -1,15 +1,5 @@ package com.colen.postea.checker; -import akka.japi.Pair; -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraft.world.WorldSavedData; -import net.minecraft.world.storage.MapStorage; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.world.WorldEvent; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -18,6 +8,17 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.HashSet; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import net.minecraft.world.WorldSavedData; +import net.minecraft.world.storage.MapStorage; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.world.WorldEvent; + +import akka.japi.Pair; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + public class PosteaProcessedChunksWorldSavedData extends WorldSavedData { private static final String DATA_NAME = "GregTech_GlobalIntValue"; @@ -29,7 +30,8 @@ public class PosteaProcessedChunksWorldSavedData extends WorldSavedData { boolean updateChunk = chunkCoordinates.add(new Pair<>(x, z)); if (updateChunk) { - // Only mark the world NBT as dirty if we actually process a new chunk, since we will need to save that info. + // Only mark the world NBT as dirty if we actually process a new chunk, since we will need to save that + // info. INSTANCE.markDirty(); } @@ -75,13 +77,13 @@ public class PosteaProcessedChunksWorldSavedData extends WorldSavedData { } } - public static void get(World world) { chunkCoordinates.clear(); MapStorage storage = world.mapStorage; - INSTANCE = (PosteaProcessedChunksWorldSavedData) storage.loadData(PosteaProcessedChunksWorldSavedData.class, DATA_NAME); + INSTANCE = (PosteaProcessedChunksWorldSavedData) storage + .loadData(PosteaProcessedChunksWorldSavedData.class, DATA_NAME); if (INSTANCE == null) { INSTANCE = new PosteaProcessedChunksWorldSavedData();