aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaven Szewczyk <git@eigenraven.me>2023-02-10 14:32:09 +0000
committerGitHub <noreply@github.com>2023-02-10 14:32:09 +0000
commitce3825fdbc4bacb5efe6cf18a445719c02b53fa4 (patch)
tree46d81e34516b2cc044653d97c2b426f70fb11d20
parentf069e4fa8875869cc07a7613e593903aa1a51d50 (diff)
downloadGT5-Unofficial-ce3825fdbc4bacb5efe6cf18a445719c02b53fa4.tar.gz
GT5-Unofficial-ce3825fdbc4bacb5efe6cf18a445719c02b53fa4.tar.bz2
GT5-Unofficial-ce3825fdbc4bacb5efe6cf18a445719c02b53fa4.zip
Rfg cleanup (#1726)
* Update buildscript, add all recently added gradle.properties entries * Dependency version bumps and cleanup * Bump eternal singularity version * Update buildscript * Make AE2 a required dependency * Switch version to class generation from token replacement
-rw-r--r--build.gradle184
-rw-r--r--dependencies.gradle123
-rw-r--r--gradle.properties94
-rw-r--r--repositories.gradle28
-rw-r--r--src/main/java/gregtech/GT_Mod.java2
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java22
-rw-r--r--src/main/java/gregtech/api/metatileentity/MetaTileEntity.java12
-rw-r--r--src/main/java/gregtech/api/multitileentity/MultiTileEntityBlock.java2
-rw-r--r--src/main/java/gregtech/api/objects/AE2DigitalChestHandler.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java19
-rw-r--r--src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java6
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java4
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java4
-rw-r--r--src/main/java/gregtech/loaders/postload/recipes/ThaumcraftRecipes.java69
17 files changed, 356 insertions, 249 deletions
diff --git a/build.gradle b/build.gradle
index 447de38414..b808930520 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,4 +1,4 @@
-//version: 1675268365
+//version: 1676031737
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -9,11 +9,15 @@
import com.diffplug.blowdryer.Blowdryer
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
+import com.gtnewhorizons.retrofuturagradle.ObfuscationAttribute
import com.gtnewhorizons.retrofuturagradle.mcp.ReobfuscatedJar
+import com.gtnewhorizons.retrofuturagradle.minecraft.RunMinecraftTask
import com.matthewprenger.cursegradle.CurseArtifact
import com.matthewprenger.cursegradle.CurseRelation
import com.modrinth.minotaur.dependencies.ModDependency
import com.modrinth.minotaur.dependencies.VersionDependency
+import cpw.mods.fml.relauncher.Side
+import org.gradle.api.tasks.options.Option;
import org.gradle.internal.logging.text.StyledTextOutput.Style
import org.gradle.internal.logging.text.StyledTextOutputFactory
import org.jetbrains.gradle.ext.*
@@ -23,6 +27,7 @@ import java.nio.file.Paths
import java.util.concurrent.TimeUnit
import java.util.zip.ZipEntry
import java.util.zip.ZipOutputStream
+import javax.inject.Inject
buildscript {
repositories {
@@ -66,7 +71,7 @@ plugins {
id 'com.diffplug.spotless' version '6.7.2' apply false
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
- id 'com.gtnewhorizons.retrofuturagradle' version '1.1.4'
+ id 'com.gtnewhorizons.retrofuturagradle' version '1.1.6'
}
boolean settingsupdated = verifySettingsGradle()
settingsupdated = verifyGitAttributes() || settingsupdated
@@ -186,11 +191,21 @@ configurations {
}
if (enableModernJavaSyntax.toBoolean()) {
+ repositories {
+ mavenCentral {
+ mavenContent {
+ includeGroup("me.eigenraven.java8unsupported")
+ }
+ }
+ }
+
dependencies {
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0'
compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') {
transitive = false // We only care about the 1 annotation class
}
+ // Allow using jdk.unsupported classes like sun.misc.Unsafe in the compiled code, working around JDK-8206937.
+ patchedMinecraft('me.eigenraven.java8unsupported:java-8-unsupported-shim:1.0.0')
}
tasks.withType(JavaCompile).configureEach {
@@ -401,6 +416,16 @@ configurations.configureEach {
}
}
}
+ def obfuscationAttr = it.attributes.getAttribute(ObfuscationAttribute.OBFUSCATION_ATTRIBUTE)
+ if (obfuscationAttr != null && obfuscationAttr.name == ObfuscationAttribute.SRG) {
+ resolutionStrategy.eachDependency { DependencyResolveDetails details ->
+ // Remap CoFH core cursemaven dev jar to the obfuscated version for runObfClient/Server
+ if (details.requested.group == 'curse.maven' && details.requested.name.endsWith('-69162') && details.requested.version == '2388751') {
+ details.useVersion '2388750'
+ details.because 'Pick obfuscated jar'
+ }
+ }
+ }
}
// Ensure tests have access to minecraft classes
@@ -520,20 +545,20 @@ dependencies {
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
annotationProcessor('com.google.guava:guava:24.1.1-jre')
annotationProcessor('com.google.code.gson:gson:2.8.6')
- annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.10:processor')
+ annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.12:processor')
if (usesMixinDebug.toBoolean()) {
runtimeOnlyNonPublishable('org.jetbrains:intellij-fernflower:1.2.1.16')
}
}
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
- implementation('com.gtnewhorizon:gtnhmixins:2.1.10')
+ implementation('com.gtnewhorizon:gtnhmixins:2.1.12')
}
}
pluginManager.withPlugin('org.jetbrains.kotlin.kapt') {
if (usesMixins.toBoolean()) {
dependencies {
- kapt('com.gtnewhorizon:gtnhmixins:2.1.10:processor')
+ kapt('com.gtnewhorizon:gtnhmixins:2.1.12:processor')
}
}
}
@@ -633,9 +658,142 @@ tasks.named("processResources", ProcessResources).configure {
if (usesMixins.toBoolean()) {
from refMap
+ dependsOn("compileJava", "compileScala")
+ }
+}
+
+ext.java17Toolchain = (JavaToolchainSpec spec) -> {
+ spec.languageVersion.set(JavaLanguageVersion.of(17))
+ spec.vendor.set(JvmVendorSpec.matching("jetbrains"))
+}
+
+ext.java17DependenciesCfg = configurations.create("java17Dependencies")
+ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies")
+
+dependencies {
+ def lwjgl3ifyVersion = '1.1.21'
+ def asmVersion = '9.4'
+ if (modId != 'lwjgl3ify') {
+ java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
+ }
+ if (modId != 'hodgepodge') {
+ java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.0.31')
+ }
+
+ java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false}
+ java17PatchDependencies("org.ow2.asm:asm:${asmVersion}")
+ java17PatchDependencies("org.ow2.asm:asm-commons:${asmVersion}")
+ java17PatchDependencies("org.ow2.asm:asm-tree:${asmVersion}")
+ java17PatchDependencies("org.ow2.asm:asm-analysis:${asmVersion}")
+ java17PatchDependencies("org.ow2.asm:asm-util:${asmVersion}")
+ java17PatchDependencies('org.ow2.asm:asm-deprecated:7.1')
+ java17PatchDependencies("org.apache.commons:commons-lang3:3.12.0")
+ java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches")
+}
+
+ext.java17JvmArgs = [
+ // Java 9+ support
+ "--illegal-access=warn",
+ "-Dfile.encoding=UTF-8",
+ "-Djava.security.manager=allow",
+ "--add-opens", "java.base/jdk.internal.loader=ALL-UNNAMED",
+ "--add-opens", "java.base/java.net=ALL-UNNAMED",
+ "--add-opens", "java.base/java.nio=ALL-UNNAMED",
+ "--add-opens", "java.base/java.io=ALL-UNNAMED",
+ "--add-opens", "java.base/java.lang=ALL-UNNAMED",
+ "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED",
+ "--add-opens", "java.base/java.text=ALL-UNNAMED",
+ "--add-opens", "java.base/java.util=ALL-UNNAMED",
+ "--add-opens", "java.base/jdk.internal.reflect=ALL-UNNAMED",
+ "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
+ "--add-opens", "java.desktop/sun.awt.image=ALL-UNNAMED",
+ "--add-modules", "jdk.dynalink",
+ "--add-opens", "jdk.dynalink/jdk.dynalink.beans=ALL-UNNAMED",
+ "--add-modules", "java.sql.rowset",
+ "--add-opens", "java.sql.rowset/javax.sql.rowset.serial=ALL-UNNAMED"
+]
+
+ext.hotswapJvmArgs = [
+ // DCEVM advanced hot reload
+ "-XX:+AllowEnhancedClassRedefinition",
+ "-XX:HotswapAgent=fatjar"
+]
+
+ext.setupHotswapAgentTask = tasks.register("setupHotswapAgent") {
+ group = "GTNH Buildscript"
+ description = "Installs a recent version of HotSwapAgent into the Java 17 JetBrains runtime directory"
+ def hsaUrl = 'https://github.com/HotswapProjects/HotswapAgent/releases/download/1.4.2-SNAPSHOT/hotswap-agent-1.4.2-SNAPSHOT.jar'
+ def targetFolderProvider = javaToolchains.launcherFor(java17Toolchain).map {it.metadata.installationPath.dir("lib/hotswap")}
+ def targetFilename = "hotswap-agent.jar"
+ onlyIf {
+ !targetFolderProvider.get().file(targetFilename).asFile.exists()
+ }
+ doLast {
+ def targetFolder = targetFolderProvider.get()
+ targetFolder.asFile.mkdirs()
+ download.run {
+ src hsaUrl
+ dest targetFolder.file(targetFilename).asFile
+ overwrite false
+ tempAndMove true
+ }
+ }
+}
+
+public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
+ // IntelliJ doesn't seem to allow commandline arguments so we also support an env variable
+ private boolean enableHotswap = Boolean.valueOf(System.getenv("HOTSWAP"));
+
+ @Input
+ public boolean getEnableHotswap() { return enableHotswap }
+ @Option(option = "hotswap", description = "Enables HotSwapAgent for enhanced class reloading under a debugger")
+ public boolean setEnableHotswap(boolean enable) { enableHotswap = enable }
+
+ @Inject
+ public RunHotswappableMinecraftTask(Side side, String superTask) {
+ super(side)
+
+ this.lwjglVersion = 3
+ this.javaLauncher = project.javaToolchains.launcherFor(project.java17Toolchain)
+ this.extraJvmArgs.addAll(project.java17JvmArgs)
+ this.extraJvmArgs.addAll(project.provider(() -> enableHotswap ? project.hotswapJvmArgs : []))
+
+ this.classpath(project.java17PatchDependenciesCfg)
+ if (side == Side.CLIENT) {
+ this.classpath(project.minecraftTasks.lwjgl3Configuration)
+ }
+ // Use a raw provider instead of map to not create a dependency on the task
+ this.classpath(project.provider(() -> project.tasks.named(superTask, RunMinecraftTask).get().classpath))
+ this.classpath.filter { file ->
+ !file.path.contains("2.9.4-nightly-20150209") // Remove lwjgl2
+ }
+ this.classpath(project.java17DependenciesCfg)
+
+ if (!(project.usesMixins.toBoolean() || project.forceEnableMixins.toBoolean())) {
+ this.extraArgs.addAll("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
+ }
}
}
+def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Side.CLIENT, "runClient")
+runClient17Task.configure {
+ setup(project)
+ group = "Modded Minecraft"
+ description = "Runs the modded client using Java 17, lwjgl3ify and Hodgepodge"
+ dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar')
+ mainClass = "GradleStart"
+}
+
+def runServer17Task = tasks.register("runServer17", RunHotswappableMinecraftTask, Side.SERVER, "runServer")
+runServer17Task.configure {
+ setup(project)
+ group = "Modded Minecraft"
+ description = "Runs the modded server using Java 17, lwjgl3ify and Hodgepodge"
+ dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar')
+ mainClass = "GradleStartServer"
+ extraArgs.add("nogui")
+}
+
def getManifestAttributes() {
def manifestAttributes = [:]
if (!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) {
@@ -705,7 +863,7 @@ if (usesShadowedDependencies.toBoolean()) {
javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
skip()
}
- for (runTask in ["runClient", "runServer"]) {
+ for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) {
tasks.named(runTask).configure {
dependsOn("shadowJar")
}
@@ -754,6 +912,20 @@ idea {
"2. Run Server"(Gradle) {
taskNames = ["runServer"]
}
+ "1a. Run Client (Java 17)"(Gradle) {
+ taskNames = ["runClient17"]
+ }
+ "2a. Run Server (Java 17)"(Gradle) {
+ taskNames = ["runServer17"]
+ }
+ "1b. Run Client (Java 17, Hotswap)"(Gradle) {
+ taskNames = ["runClient17"]
+ envs = ["HOTSWAP": "true"]
+ }
+ "2b. Run Server (Java 17, Hotswap)"(Gradle) {
+ taskNames = ["runServer17"]
+ envs = ["HOTSWAP": "true"]
+ }
"3. Run Obfuscated Client"(Gradle) {
taskNames = ["runObfClient"]
}
diff --git a/dependencies.gradle b/dependencies.gradle
index 7353113def..418d3f99d1 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -1,79 +1,58 @@
-// NOTE: Using explicit tags now instead of master-SNAPSHOT. (READ: Don't use master-SNAPSHOT anymore!!!)
-// That means if you are depending on a change in a dependency, you need to tag the dependency
-// and update the pinned tag here. This _should_ allow for more reproducible historical builds, while
-// also being more explicit about what is depended on.
-
+/*
+ * Add your dependencies here. Supported configurations:
+ * - api("group:name:version:classifier"): if you use the types from this dependency in the public API of this mod
+ * Available at runtime and compiletime for mods depending on this mod
+ * - implementation("g:n:v:c"): if you need this for internal implementation details of the mod, but none of it is visible via the public API
+ * Available at runtime but not compiletime for mods depending on this mod
+ * - compileOnly("g:n:v:c"): if the mod you're building doesn't need this dependency during runtime at all, e.g. for optional mods
+ * Not available at all for mods depending on this mod, only visible at compiletime for this mod
+ * - runtimeOnly("g:n:v:c"): if you don't need this at compile time, but want it to be present at runtime
+ * Available at runtime for mods depending on this mod
+ * - annotationProcessor("g:n:v:c"): mostly for java compiler plugins, if you know you need this, use it, otherwise don't worry
+ * - testCONFIG("g:n:v:c") - replace CONFIG by one of the above (except api), same as above but for the test sources instead of main
+ *
+ * - shadowImplementation("g:n:v:c"): effectively the same as API, but the dependency is included in your jar under a renamed package name
+ * Requires you to enable usesShadowedDependencies in gradle.properties
+ *
+ * - compile("g:n:v:c"): deprecated, replace with "api" (works like the old "compile") or "implementation" (can be more efficient)
+ *
+ * You can exclude transitive dependencies (dependencies of the chosen dependency) by appending { transitive = false } if needed,
+ * but use this sparingly as it can break using your mod as another mod's dependency if you're not careful.
+ *
+ * For more details, see https://docs.gradle.org/7.6/userguide/java_library_plugin.html#sec:java_library_configurations_graph
+ */
dependencies {
- compile("com.github.GTNewHorizons:StructureLib:1.2.1:dev")
+ api("com.github.GTNewHorizons:StructureLib:1.2.1:dev")
+
+ api("com.github.GTNewHorizons:NotEnoughItems:2.3.28-GTNH:dev")
+ api("com.github.GTNewHorizons:GTNHLib:0.0.12:dev")
+ api("com.github.GTNewHorizons:ModularUI:1.0.60:dev")
+ api("com.github.GTNewHorizons:waila:1.5.23:dev")
+ api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-155-GTNH:dev")
+ implementation("com.github.GTNewHorizons:Eternal-Singularity:1.0.10:dev")
- compile("com.github.GTNewHorizons:NotEnoughItems:2.3.24-GTNH:dev")
- compile("com.github.GTNewHorizons:CodeChickenLib:1.1.5.7:dev")
- compile("com.github.GTNewHorizons:GTNHLib:0.0.11:dev")
- compile("com.github.GTNewHorizons:ModularUI:1.0.56:dev")
- compile("com.github.GTNewHorizons:waila:1.5.22:dev")
- compile("com.github.GTNewHorizons:Eternal-Singularity:1.0.8:dev")
+ api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
- compile("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
+ compileOnly("com.github.GTNewHorizons:EnderCore:0.2.12:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:ForestryMC:4.5.6:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:gendustry:1.6.5.5-GTNH:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:Railcraft:9.13.18:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:Galacticraft:3.0.65-GTNH:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:AppleCore:3.2.10:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.9.19-GTNH:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:Chisel:2.10.17-GTNH:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.57:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:BuildCraft:7.1.28:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:Translocators:1.1.2.21:dev") { transitive = false }
+ compileOnly("curse.maven:cofh-core-69162:2388751") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:Nuclear-Control:2.4.16:dev") { transitive = false }
+ compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:Avaritia:1.31:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:ProjectRed:4.7.9-GTNH:dev") { transitive = false }
- compileOnly("com.github.GTNewHorizons:EnderCore:0.2.12:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:ForestryMC:4.5.6:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:gendustry:1.6.5.5-GTNH:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:Railcraft:9.13.16:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:Galacticraft:3.0.64-GTNH:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:AppleCore:3.2.8:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.9.16-GTNH:dev") {
- transitive = false
- }
- compile("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-152-GTNH:dev") {
- transitive = false
- }
- compile("com.github.GTNewHorizons:Chisel:2.10.16-GTNH:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.54:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:BuildCraft:7.1.28:dev") {
- transitive = false
- }
- compileOnly("commons-io:commons-io:2.4") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:Translocators:1.1.2.20:dev") {
- transitive = false
- }
- compileOnly("curse.maven:cofh-core-69162:2388751") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:Nuclear-Control:2.4.16:dev") {
- transitive = false
- }
- compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:Avaritia:1.31:dev") {
- transitive = false
- }
- compileOnly("com.github.GTNewHorizons:ProjectRed:4.7.9-GTNH:dev") {
- transitive = false
- }
- compileOnly("com.google.auto.value:auto-value-annotations:1.9") {
- transitive = false
- }
- annotationProcessor("com.google.auto.value:auto-value:1.9")
+ compileOnly("com.google.auto.value:auto-value-annotations:1.10.1") { transitive = false }
+ annotationProcessor("com.google.auto.value:auto-value:1.10.1")
- testImplementation(platform('org.junit:junit-bom:5.8.2'))
+ testImplementation(platform('org.junit:junit-bom:5.9.2'))
testImplementation('org.junit.jupiter:junit-jupiter')
}
diff --git a/gradle.properties b/gradle.properties
index 028ed36c1c..a478e626d1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -15,35 +15,56 @@ autoUpdateBuildScript = false
minecraftVersion = 1.7.10
forgeVersion = 10.13.4.1614
+# Specify a MCP channel and mappings version for dependency deobfuscation and the deobfParams task.
+channel = stable
+mappingsVersion = 12
+
+# Define other MCP mappings for dependency deobfuscation
+remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
+
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
# restart Minecraft in development. Choose this dependent on your mod:
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
developmentEnvironmentUserName = Developer
-# Define a source file of your project with:
+# Enables using modern java syntax (up to version 17) via Jabel, while still targetting JVM 8.
+# See https://github.com/bsideup/jabel for details on how this works.
+enableModernJavaSyntax = false
+
+# Enables injecting missing generics into the decompiled source code for a better coding experience
+# Turns most publically visible List, Map, etc. into proper List<Type>, Map<K, V> types
+enableGenericInjection = false
+
+
+# Generate a class with String fields for the mod id, name, version and group name named with the fields below
+generateGradleTokenClass = gregtech.GT_Version
+gradleTokenModId =
+gradleTokenModName =
+gradleTokenVersion = VERSION
+gradleTokenGroupName =
+# [DEPRECATED]
+# Multiple source files can be defined here by providing a comma-seperated list: Class1.java,Class2.java,Class3.java
# public static final String VERSION = "GRADLETOKEN_VERSION";
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements
-replaceGradleTokenInFile = GT_Mod.java
-gradleTokenModId =
-gradleTokenModName =
-gradleTokenVersion = GRADLETOKEN_VERSION
-gradleTokenGroupName =
+replaceGradleTokenInFile =
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
apiPackage =
-# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/
+# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg
accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
-# Specify the location of your implementation of IMixinPlugin. Leave it empty otherwise.
+# Adds some debug arguments like verbose output and export
+usesMixinDebug = false
+# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage =
@@ -55,9 +76,60 @@ coreModClass =
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
-# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
+# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
+forceEnableMixins = true
+
+# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies = false
+# If disabled, won't remove unused classes from shaded dependencies. Some libraries use reflection to access
+# their own classes, making the minimization unreliable.
+minimizeShadowedDependencies = true
+# If disabled, won't rename the shadowed classes.
+relocateShadowedDependencies = true
-# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
-forceEnableMixins = true
+# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories
+includeWellKnownRepositories = true
+
+# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token.
+
+# The project's ID on Modrinth. Can be either the slug or the ID.
+# Leave this empty if you don't want to publish on Modrinth.
+modrinthProjectId =
+
+# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
+# Syntax: scope1-type1:name1;scope2-type2:name2;...
+# Where scope can be one of [required, optional, incompatible, embedded],
+# type can be one of [project, version],
+# and the name is the Modrinth project or version slug/id of the other mod.
+# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
+# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
+modrinthRelations =
+
+
+# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
+
+# The project's numeric ID on CurseForge. You can find this in the About Project box.
+# Leave this empty if you don't want to publish on CurseForge.
+curseForgeProjectId =
+
+# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
+# Syntax: type1:name1;type2:name2;...
+# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
+# and the name is the CurseForge project slug of the other mod.
+# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
+# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
+curseForgeRelations =
+
+
+# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
+# projects. New projects should not use this parameter.
+# customArchiveBaseName =
+
+# Optional parameter to prevent the source code from being published
+# noPublishedSources =
+
+# Uncomment this to disable spotless checks
+# This should only be uncommented to keep it easier to sync with upstream/other forks.
+# That is, if there is no other active fork/upstream, NEVER change this.
+# disableSpotless = true
diff --git a/repositories.gradle b/repositories.gradle
index 8c26061aab..c227b16ec2 100644
--- a/repositories.gradle
+++ b/repositories.gradle
@@ -1,32 +1,4 @@
// Add any additional repositories for your dependencies here
repositories {
- mavenLocal()
- maven {
- name = "GTNH"
- url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
- }
- maven {
- name = "ic2"
- url = "https://maven.ic2.player.to/"
- metadataSources {
- mavenPom()
- artifact()
- }
- }
- maven {
- name = "ic2"
- url = "https://maven2.ic2.player.to/"
- metadataSources {
- mavenPom()
- artifact()
- }
- }
- maven {
- url "https://cursemaven.com"
- }
- maven {
- name = "jitpack.io"
- url = "https://jitpack.io"
- }
}
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 14ff8b2c2d..33c02f37dd 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -111,7 +111,7 @@ import ic2.api.recipe.RecipeOutput;
+ " after:PFAAGeologica;"
+ " after:Thaumcraft;"
+ " after:Railcraft;"
- + " after:appliedenergistics2;"
+ + " required-after:appliedenergistics2;"
+ " after:ThermalExpansion;"
+ " after:TwilightForest;"
+ " after:harvestcraft;"
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index d8a512c954..8cf45d1984 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -49,7 +49,6 @@ import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructableProvider;
-import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.ReflectionHelper;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
@@ -80,16 +79,6 @@ import ic2.api.Direction;
* <p/>
* This is the main TileEntity for EVERYTHING.
*/
-@Optional.InterfaceList(
- value = {
- @Optional.Interface(
- iface = "appeng.api.networking.security.IActionHost",
- modid = "appliedenergistics2",
- striprefs = true),
- @Optional.Interface(
- iface = "appeng.me.helpers.IGridProxyable",
- modid = "appliedenergistics2",
- striprefs = true) })
public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTechTileEntity, IActionHost,
IGridProxyable, IAlignmentProvider, IConstructableProvider, IDebugableTileEntity, IGregtechWailaProvider {
@@ -2329,7 +2318,6 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec
}
@Override
- @Optional.Method(modid = "appliedenergistics2")
public IGridNode getGridNode(ForgeDirection forgeDirection) {
if (mFacing != forgeDirection.ordinal()) return null;
final AENetworkProxy gp = getProxy();
@@ -2337,61 +2325,51 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity implements IGregTec
}
@Override
- @Optional.Method(modid = "appliedenergistics2")
public AECableType getCableConnectionType(ForgeDirection forgeDirection) {
return mMetaTileEntity == null ? AECableType.NONE : mMetaTileEntity.getCableConnectionType(forgeDirection);
}
@Override
- @Optional.Method(modid = "appliedenergistics2")
public void securityBreak() {}
@Override
- @Optional.Method(modid = "appliedenergistics2")
public IGridNode getActionableNode() {
final AENetworkProxy gp = getProxy();
return gp != null ? gp.getNode() : null;
}
@Override
- @Optional.Method(modid = "appliedenergistics2")
public AENetworkProxy getProxy() {
return mMetaTileEntity == null ? null : mMetaTileEntity.getProxy();
}
@Override
- @Optional.Method(modid = "appliedenergistics2")
public DimensionalCoord getLocation() {
return new DimensionalCoord(this);
}
@Override
- @Optional.Method(modid = "appliedenergistics2")
public void gridChanged() {
if (mMetaTileEntity != null) mMetaTileEntity.gridChanged();
}
@TileEvent(TileEventType.WORLD_NBT_READ)
- @Optional.Method(modid = "appliedenergistics2")
public void readFromNBT_AENetwork(final NBTTagCompound data) {
final AENetworkProxy gp = getProxy();
if (gp != null) getProxy().readFromNBT(data);
}
@TileEvent(TileEventType.WORLD_NBT_WRITE)
- @Optional.Method(modid = "appliedenergistics2")
public void writeToNBT_AENetwork(final NBTTagCompound data) {
final AENetworkProxy gp = getProxy();
if (gp != null) gp.writeToNBT(data);
}
- @Optional.Method(modid = "appliedenergistics2")
void onChunkUnloadAE() {
final AENetworkProxy gp = getProxy();
if (gp != null) gp.onChunkUnload();
}
- @Optional.Method(modid = "appliedenergistics2")
void invalidateAE() {
final AENetworkProxy gp = getProxy();
if (gp != null) gp.invalidate();
diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
index 64bc531947..26caeaa416 100644
--- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
@@ -39,8 +39,6 @@ import appeng.me.helpers.AENetworkProxy;
import com.gtnewhorizons.modularui.api.forge.ItemStackHandler;
-import cpw.mods.fml.common.Loader;
-import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gnu.trove.list.TIntList;
@@ -151,7 +149,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac
/**
* This method will only be called on client side
- *
+ *
* @return whether the secondary description should be display. default is false
*/
@Deprecated
@@ -1164,17 +1162,14 @@ public abstract class MetaTileEntity implements IMetaTileEntity, IMachineCallbac
// === AE2 compat ===
- @Optional.Method(modid = "appliedenergistics2")
public AECableType getCableConnectionType(ForgeDirection forgeDirection) {
return AECableType.NONE;
}
- @Optional.Method(modid = "appliedenergistics2")
public AENetworkProxy getProxy() {
return null;
}
- @Optional.Method(modid = "appliedenergistics2")
public void gridChanged() {}</