aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle226
-rw-r--r--dependencies.gradle2
-rw-r--r--gradle.properties111
-rw-r--r--repositories.gradle21
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java21
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java2
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java4
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/block/ModBlocks.java2
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java6
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java6
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java6
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java4
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java4
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java38
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT5CFGHelper.java2
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java7
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT5UndergroundFluidHelper.java2
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GuiRecipeHelper.java7
18 files changed, 255 insertions, 216 deletions
diff --git a/build.gradle b/build.gradle
index 927ed20fdb..a8b7532dea 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,4 +1,4 @@
-//version: 1678003329
+//version: 1684218858
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -6,29 +6,25 @@
*/
-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.gtnewhorizons.retrofuturagradle.util.Distribution
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.gradle.internal.xml.XmlTransformer
-import org.jetbrains.gradle.ext.*
+import org.jetbrains.gradle.ext.Application
+import org.jetbrains.gradle.ext.Gradle
+import javax.inject.Inject
import java.nio.file.Files
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 {
@@ -65,22 +61,26 @@ plugins {
id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false
id 'org.jetbrains.kotlin.kapt' version '1.8.0' apply false
id 'com.google.devtools.ksp' version '1.8.0-1.0.9' apply false
- 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 '7.1.2' apply false
- id 'com.palantir.git-version' version '0.13.0' apply false // 0.13.0 is the last jvm8 supporting version
- id 'de.undercouch.download' version '5.3.0'
+ 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 'com.github.gmazzo.buildconfig' version '3.1.0' apply false // Unused, available for addon.gradle
- id 'com.diffplug.spotless' version '6.7.2' apply false
+ 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.2.3'
+ id 'com.gtnewhorizons.retrofuturagradle' version '1.3.14'
}
+
+print("You might want to check out './gradlew :faq' if your build fails.\n")
+
boolean settingsupdated = verifySettingsGradle()
settingsupdated = verifyGitAttributes() || settingsupdated
if (settingsupdated)
throw new GradleException("Settings has been updated, please re-run task.")
-if (project.file('.git/HEAD').isFile()) {
+// In submodules, .git is a file pointing to the real git dir
+if (project.file('.git/HEAD').isFile() || project.file('.git').isFile()) {
apply plugin: 'com.palantir.git-version'
}
@@ -132,7 +132,7 @@ propertyDefaultIfUnset("enableGenericInjection", false) // On by default for new
// this is meant to be set using the user wide property file. by default we do nothing.
propertyDefaultIfUnset("ideaOverrideBuildType", "") // Can be nothing, "gradle" or "idea"
-project.extensions.add(Blowdryer, "Blowdryer", Blowdryer) // Make blowdryer available in "apply from:" scripts
+project.extensions.add(com.diffplug.blowdryer.Blowdryer, "Blowdryer", com.diffplug.blowdryer.Blowdryer) // Make blowdryer available in "apply from:" scripts
if (!disableSpotless) {
apply plugin: 'com.diffplug.spotless'
apply from: Blowdryer.file('spotless.gradle')
@@ -160,6 +160,14 @@ java {
}
}
+tasks.withType(JavaCompile).configureEach {
+ options.encoding = "UTF-8"
+}
+
+tasks.withType(ScalaCompile).configureEach {
+ options.encoding = "UTF-8"
+}
+
pluginManager.withPlugin('org.jetbrains.kotlin.jvm') {
// If Kotlin is enabled in the project
kotlin {
@@ -193,6 +201,14 @@ configurations {
canBeConsumed = false
canBeResolved = false
}
+
+ create("devOnlyNonPublishable") {
+ description = "Runtime and compiletime dependencies that are not published alongside the jar (compileOnly + runtimeOnlyNonPublishable)"
+ canBeConsumed = false
+ canBeResolved = false
+ }
+ compileOnly.extendsFrom(devOnlyNonPublishable)
+ runtimeOnlyNonPublishable.extendsFrom(devOnlyNonPublishable)
}
if (enableModernJavaSyntax.toBoolean()) {
@@ -206,6 +222,8 @@ if (enableModernJavaSyntax.toBoolean()) {
dependencies {
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0'
+ // workaround for https://github.com/bsideup/jabel/issues/174
+ annotationProcessor 'net.java.dev.jna:jna-platform:5.13.0'
compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') {
transitive = false // We only care about the 1 annotation class
}
@@ -391,14 +409,12 @@ minecraft {
username = developmentEnvironmentUserName.toString()
- lwjgl3Version = "3.3.2-SNAPSHOT"
+ lwjgl3Version = "3.3.2"
// Enable assertions in the current mod
extraRunJvmArguments.add("-ea:${modGroup}")
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
- extraTweakClasses.add("org.spongepowered.asm.launch.MixinTweaker")
-
if (usesMixinDebug.toBoolean()) {
extraRunJvmArguments.addAll([
"-Dmixin.debug.countInjections=true",
@@ -513,14 +529,6 @@ repositories {
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
}
- if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
- if (usesMixinDebug.toBoolean()) {
- maven {
- name = "Fabric Maven"
- url = "https://maven.fabricmc.net/"
- }
- }
- }
maven {
name 'sonatype'
url 'https://oss.sonatype.org/content/repositories/snapshots/'
@@ -559,29 +567,50 @@ repositories {
}
}
+def mixinProviderGroup = "io.github.legacymoddingmc"
+def mixinProviderModule = "unimixins"
+def mixinProviderVersion = "0.1.7.1"
+def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
+def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
+ext.mixinProviderSpec = mixinProviderSpec
+
dependencies {
if (usesMixins.toBoolean()) {
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.13:processor')
+ annotationProcessor(mixinProviderSpec)
if (usesMixinDebug.toBoolean()) {
runtimeOnlyNonPublishable('org.jetbrains:intellij-fernflower:1.2.1.16')
}
}
- if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
- implementation('com.gtnewhorizon:gtnhmixins:2.1.13')
+ if (usesMixins.toBoolean()) {
+ implementation(mixinProviderSpec)
+ } else if (forceEnableMixins.toBoolean()) {
+ runtimeOnlyNonPublishable(mixinProviderSpec)
}
}
pluginManager.withPlugin('org.jetbrains.kotlin.kapt') {
if (usesMixins.toBoolean()) {
dependencies {
- kapt('com.gtnewhorizon:gtnhmixins:2.1.13:processor')
+ kapt(mixinProviderSpec)
}
}
}
+// Replace old mixin mods with unimixins
+// https://docs.gradle.org/8.0.2/userguide/resolution_rules.html#sec:substitution_with_classifier
+configurations.all {
+ resolutionStrategy.dependencySubstitution {
+ substitute module('com.gtnewhorizon:gtnhmixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
+ substitute module('com.github.GTNewHorizons:Mixingasm') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
+ substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
+ substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
+ substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier")
+ }
+}
+
apply from: 'dependencies.gradle'
def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'
@@ -695,13 +724,13 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
}
dependencies {
- def lwjgl3ifyVersion = '1.1.35'
+ def lwjgl3ifyVersion = '1.3.5'
def asmVersion = '9.4'
if (modId != 'lwjgl3ify') {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
- java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.0.40')
+ java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.13')
}
java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false}
@@ -775,7 +804,7 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
public boolean setEnableHotswap(boolean enable) { enableHotswap = enable }
@Inject
- public RunHotswappableMinecraftTask(Side side, String superTask, org.gradle.api.invocation.Gradle gradle) {
+ public RunHotswappableMinecraftTask(Distribution side, String superTask, org.gradle.api.invocation.Gradle gradle) {
super(side, gradle)
this.lwjglVersion = 3
@@ -784,7 +813,7 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
this.extraJvmArgs.addAll(project.provider(() -> enableHotswap ? project.hotswapJvmArgs : []))
this.classpath(project.java17PatchDependenciesCfg)
- if (side == Side.CLIENT) {
+ if (side == Distribution.CLIENT) {
this.classpath(project.minecraftTasks.lwjgl3Configuration)
}
// Use a raw provider instead of map to not create a dependency on the task
@@ -793,14 +822,22 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
!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")
+ public void setup(Project project) {
+ super.setup(project)
+ if (project.usesMixins.toBoolean()) {
+ this.extraJvmArgs.addAll(project.provider(() -> {
+ def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec))
+ mixinCfg.canBeConsumed = false
+ mixinCfg.transitive = false
+ enableHotswap ? ["-javaagent:" + mixinCfg.singleFile.absolutePath] : []
+ }))
}
}
}
-def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Side.CLIENT, "runClient")
+def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Distribution.CLIENT, "runClient")
runClient17Task.configure {
setup(project)
group = "Modded Minecraft"
@@ -811,7 +848,7 @@ runClient17Task.configure {
userUUID = minecraft.userUUID
}
-def runServer17Task = tasks.register("runServer17", RunHotswappableMinecraftTask, Side.SERVER, "runServer")
+def runServer17Task = tasks.register("runServer17", RunHotswappableMinecraftTask, Distribution.DEDICATED_SERVER, "runServer")
runServer17Task.configure {
setup(project)
group = "Modded Minecraft"
@@ -852,11 +889,6 @@ tasks.named("jar", Jar).configure {
}
if (usesShadowedDependencies.toBoolean()) {
- tasks.register('relocateShadowJar', ConfigureShadowRelocation) {
- target = tasks.shadowJar
- prefix = modGroup + ".shadow"
- enabled = relocateShadowedDependencies.toBoolean()
- }
tasks.named("shadowJar", ShadowJar).configure {
manifest {
attributes(getManifestAttributes())
@@ -872,7 +904,8 @@ if (usesShadowedDependencies.toBoolean()) {
]
archiveClassifier.set('dev')
if (relocateShadowedDependencies.toBoolean()) {
- dependsOn(relocateShadowJar)
+ relocationPrefix = modGroup + ".shadow"
+ enableRelocation = true
}
}
configurations.runtimeElements.outgoing.artifacts.clear()
@@ -1006,6 +1039,7 @@ idea {
}
compiler.javac {
afterEvaluate {
+ javacAdditionalOptions = "-encoding utf8"
moduleJavacAdditionalOptions = [
(project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ')
]
@@ -1125,7 +1159,7 @@ if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) {
}
}
if (usesMixins.toBoolean()) {
- addModrinthDep("required", "project", "gtnhmixins")
+ addModrinthDep("required", "project", "unimixins")
}
tasks.modrinth.dependsOn(build)
tasks.publish.dependsOn(tasks.modrinth)
@@ -1169,7 +1203,7 @@ if (curseForgeProjectId.size() != 0 && System.getenv("CURSEFORGE_TOKEN") != null
}
}
if (usesMixins.toBoolean()) {
- addCurseForgeRelation("requiredDependency", "gtnhmixins")
+ addCurseForgeRelation("requiredDependency", "unimixins")
}
tasks.curseforge.dependsOn(build)
tasks.publish.dependsOn(tasks.curseforge)
@@ -1204,7 +1238,7 @@ def addCurseForgeRelation(String type, String name) {
// Updating
-def buildscriptGradleVersion = "8.0.1"
+def buildscriptGradleVersion = "8.1.1"
tasks.named('wrapper', Wrapper).configure {
gradleVersion = buildscriptGradleVersion
@@ -1236,6 +1270,21 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA
}
}
+// If you want to add more cases to this task, implement them as arguments if total amount to print gets too large
+tasks.register('faq') {
+ group = 'GTNH Buildscript'
+ description = 'Prints frequently asked questions about building a project'
+
+ doLast {
+ print("If your build fails to fetch dependencies, they might have been deleted and replaced by newer " +
+ "versions.\nCheck if the versions you try to fetch are still on the distributing sites.\n" +
+ "The links can be found in repositories.gradle and build.gradle:repositories, " +
+ "not build.gradle:buildscript.repositories - this one is for gradle plugin metadata.\n\n" +
+ "If your build fails to recognize the syntax of new Java versions, enable Jabel in your " +
+ "gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties.")
+ }
+}
+
static URL availableBuildScriptUrl() {
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/build.gradle")
}
@@ -1373,7 +1422,7 @@ static int replaceParams(File file, Map<String, String> params) {
return 0
}
-// Dependency Deobfuscation
+// Dependency Deobfuscation (Deprecated, use the new RFG API documented in dependencies.gradle)
def deobf(String sourceURL) {
try {
@@ -1415,11 +1464,7 @@ def deobfMaven(String repoURL, String mavenDep) {
}
def deobfCurse(String curseDep) {
- try {
- return deobfMaven("https://www.cursemaven.com/", "curse.maven:$curseDep")
- } catch (Exception ignored) {
- out.style(Style.Failure).println("Failed to get $curseDep from cursemaven.")
- }
+ return dependencies.rfg.deobf("curse.maven:$curseDep")
}
// The method above is to be preferred. Use this method if the filename is not at the end of the URL.
@@ -1427,34 +1472,7 @@ def deobf(String sourceURL, String rawFileName) {
String bon2Version = "2.5.1"
String fileName = URLDecoder.decode(rawFileName, "UTF-8")
String cacheDir = "$project.gradle.gradleUserHomeDir/caches"
- String bon2Dir = "$cacheDir/forge_gradle/deobf"
- String bon2File = "$bon2Dir/BON2-${bon2Version}.jar"
String obfFile = "$cacheDir/modules-2/files-2.1/${fileName}.jar"
- String deobfFile = "$cacheDir/modules-2/files-2.1/${fileName}-deobf.jar"
-
- if (file(deobfFile).exists()) {
- return files(deobfFile)
- }
-
- String mappingsVer
- String remoteMappings = project.hasProperty('remoteMappings') ? project.remoteMappings : 'https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/'
- if (remoteMappings) {
- String id = "${forgeVersion.split("\\.")[3]}-$minecraftVersion"
- String mappingsZIP = "$cacheDir/forge_gradle/maven_downloader/de/oceanlabs/mcp/mcp_snapshot_nodoc/$id/mcp_snapshot_nodoc-${id}.zip"
-
- zipMappings(mappingsZIP, remoteMappings, bon2Dir)
-
- mappingsVer = "snapshot_$id"
- } else {
- mappingsVer = "${channel}_$mappingsVersion"
- }
-
- download.run {
- src "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/com/github/parker8283/BON2/$bon2Version-CUSTOM/BON2-$bon2Version-CUSTOM-all.jar"
- dest bon2File
- quiet true
- overwrite false
- }
download.run {
src sourceURL
@@ -1462,50 +1480,8 @@ def deobf(String sourceURL, String rawFileName) {
quiet true
overwrite false
}
-
- exec {
- commandLine 'java', '-jar', bon2File, '--inputJar', obfFile, '--outputJar', deobfFile, '--mcVer', minecraftVersion, '--mappingsVer', mappingsVer, '--notch'
- workingDir bon2Dir
- standardOutput = new FileOutputStream("${deobfFile}.log")
- }
-
- return files(deobfFile)
+ return dependencies.rfg.deobf(files(obfFile))
}
-
-def zipMappings(String zipPath, String url, String bon2Dir) {
- File zipFile = new File(zipPath)
- if (zipFile.exists()) {
- return
- }
-
- String fieldsCache = "$bon2Dir/data/fields.csv"
- String methodsCache = "$bon2Dir/data/methods.csv"
-
- download.run {
- src "${url}fields.csv"
- dest fieldsCache
- quiet true
- }
- download.run {
- src "${url}methods.csv"
- dest methodsCache
- quiet true
- }
-
- zipFile.getParentFile().mkdirs()
- ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))
-
- zos.putNextEntry(new ZipEntry("fields.csv"))
- Files.copy(Paths.get(fieldsCache), zos)
- zos.closeEntry()
-
- zos.putNextEntry(new ZipEntry("methods.csv"))
- Files.copy(Paths.get(methodsCache), zos)
- zos.closeEntry()
-
- zos.close()
-}
-
// Helper methods
def checkPropertyExists(String propertyName) {
diff --git a/dependencies.gradle b/dependencies.gradle
index e262dcf8d3..22247326b6 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -1,7 +1,7 @@
// Add your dependencies here
dependencies {
- api('com.github.GTNewHorizons:GT5-Unofficial:5.09.42.00:dev')
+ api('com.github.GTNewHorizons:GT5-Unofficial:5.09.43.50:dev')
compileOnly('com.opencsv:opencsv:4.0')
}
diff --git a/gradle.properties b/gradle.properties
index dd5be647af..691386d44a 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -15,50 +15,129 @@ autoUpdateBuildScript = false
minecraftVersion = 1.7.10
forgeVersion = 10.13.4.1614
-# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you
+# 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"
+developmentEnvironmentUserName = Developer
+
+# Enables using modern java syntax (up to version 17) via Jabel, while still targeting JVM 8.
+# See https://github.com/bsideup/jabel for details on how this works.
+enableModernJavaSyntax = true
-# Define a source file of your project with:
+# Enables injecting missing generics into the decompiled source code for a better coding experience
+# Turns most publicly 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 = pers.gwyog.gtneioreplugin.Tags
+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 mods version when compiled. You should use this to specify your mod's
+# 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 = GTNEIOrePlugin.java
-gradleTokenModId = GRADLETOKEN_MODID
-gradleTokenModName = GRADLETOKEN_MODNAME
-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
+# 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/
-# Example value: mymodid_at.cfg
+# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
+# There can be multiple files in a comma-separated list.
+# Example value: mymodid_at.cfg,nei_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 =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
-# This parameter is for legacy compatability only
+# This parameter is for legacy compatibility only
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# 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 = false
+
+# 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
+
+# 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 =
+# 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
+
+# Override the IDEA build type. Valid value is "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
+# (force use delegated build).
+# This is meant to be set in $HOME/.gradle/gradle.properties.
+# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be always native build.
+# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
+# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
+# ideaOverrideBuildType = idea
diff --git a/repositories.gradle b/repositories.gradle
index e850975183..06b13d6cce 100644
--- a/repositories.gradle
+++ b/repositories.gradle
@@ -1,22 +1,3 @@
// Add any additional repositiroes for your dependencies here
-repositories {
- maven {
- name 'GTNH Maven'
- url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
- }
- maven {
- name 'ic2'
- url 'http://maven.ic2.player.to/'
- metadataSources {
- mavenPom()
- artifact()
- }
- }
- maven {
- url 'https://cursemaven.com'
- content {
- includeGroup 'curse.maven'
- }
- }
-}
+repositories {}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java b/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
index 9561a05784..6b0505e1a4 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
@@ -6,12 +6,6 @@ import net.minecraft.item.Item;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import pers.gwyog.gtneioreplugin.plugin.IMCForNEI;
-import pers.gwyog.gtneioreplugin.plugin.block.ModBlocks;
-import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
-import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper;
-import pers.gwyog.gtneioreplugin.util.GT5UndergroundFluidHelper;
-import pers.gwyog.gtneioreplugin.util.GuiRecipeHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@@ -19,6 +13,13 @@ import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
+import pers.gwyog.gtneioreplugin.plugin.IMCForNEI;
+import pers.gwyog.gtneioreplugin.plugin.block.ModBlocks;
+import pers.gwyog.gtneioreplugin.util.CSVMaker;
+import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
+import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper;
+import pers.gwyog.gtneioreplugin.util.GT5UndergroundFluidHelper;
+import pers.gwyog.gtneioreplugin.util.GuiRecipeHelper;
@Mod(
modid = GTNEIOrePlugin.MODID,
@@ -27,9 +28,9 @@ import cpw.mods.fml.relauncher.Side;
dependencies = "required-after:gregtech;required-after:NotEnoughItems")
public class GTNEIOrePlugin {
- public static final String MODID = "GRADLETOKEN_MODID";
- public static final String NAME = "GRADLETOKEN_MODNAME";
- public static final String VERSION = "GRADLETOKEN_VERSION";
+ public static final String MODID = "gtneioreplugin";
+ public static final String NAME = "GT NEI Ore Plugin GT:NH Mod";
+ public static final String VERSION = Tags.VERSION;
public static final Logger LOG = LogManager.getLogger(NAME);
public static boolean csv = false;
public static String CSVname;
@@ -91,7 +92,7 @@ public class GTNEIOrePlugin {
if (event.getSide() == Side.CLIENT) {
new GuiRecipeHelper();
if (csv) {
- new pers.gwyog.gtneioreplugin.util.CSVMaker().run();
+ new CSVMaker().run();
}
}
}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java
index 961d29c2b3..ea60054576 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java
@@ -2,8 +2,8 @@ package pers.gwyog.gtneioreplugin.plugin;
import net.minecraft.nbt.NBTTagCompound;
-import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
import cpw.mods.fml.common.event.FMLInterModComms;
+import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
public class IMCForNEI {
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
index 31405a2f7a..17193b07fe 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
@@ -1,11 +1,11 @@
package pers.gwyog.gtneioreplugin.plugin;
+import codechicken.nei.api.API;
+import codechicken.nei.api.IConfigureNEI;
import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5SmallOreStat;
import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid;
import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5VeinStat;
-import codechicken.nei.api.API;
-import codechicken.nei.api.IConfigureNEI;
public class NEIPluginConfig implements IConfigureNEI {
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/ModBlocks.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/ModBlocks.java
index 419dbe8d00..db953c7112 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/ModBlocks.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/ModBlocks.java
@@ -5,9 +5,9 @@ import java.util.Map;
import net.minecraft.block.Block;
+import cpw.mods.fml.common.registry.GameRegistry;
import pers.gwyog.gtneioreplugin.plugin.item.ItemDimensionDisplay;
import pers.gwyog.gtneioreplugin.util.DimensionHelper;
-import cpw.mods.fml.common.registry.GameRegistry;
public class ModBlocks {
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java
index f0a9433a70..d086175849 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java
@@ -5,13 +5,13 @@ import java.awt.Rectangle;
import net.minecraft.client.resources.I18n;
-import pers.gwyog.gtneioreplugin.plugin.PluginBase;
-import pers.gwyog.gtneioreplugin.util.GuiRecipeHelper;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.recipe.GuiRecipe;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_LanguageManager;
+import pers.gwyog.gtneioreplugin.plugin.PluginBase;
+import pers.gwyog.gtneioreplugin.util.GuiRecipeHelper;
public abstract class PluginGT5Base extends PluginBase {
@@ -64,7 +64,7 @@ public abstract class PluginGT5Base extends PluginBase {
* @param dimNames Dimension names to produce a rectangle for
* @return Rectangle area of dimension names
*/
- protected Rectangle getDimensionNamesRect(GuiRecipe gui, int recipe, String dimNames) {
+ protected Rectangle getDimensionNamesRect(GuiRecipe<?> gui, int recipe, String dimNames) {
int dimNamesHeight = dimNames.length() > 70 ? 30 : (dimNames.length() > 36 ? 20 : 10);
Point offset = gui.getRecipePosition(recipe);
return new Rectangle(
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java
index 08c3d11411..512f966629 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java
@@ -8,13 +8,13 @@ import java.util.List;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
+import codechicken.nei.PositionedStack;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
import pers.gwyog.gtneioreplugin.plugin.item.ItemDimensionDisplay;
import pers.gwyog.gtneioreplugin.util.DimensionHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper.OreSmallWrapper;
-import codechicken.nei.PositionedStack;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_OreDictUnificator;
public class PluginGT5SmallOreStat extends PluginGT5Base {
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java
index 4ce0d15047..17a8216b7e 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java
@@ -11,13 +11,13 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
+import codechicken.lib.gui.GuiDraw;
+import codechicken.nei.PositionedStack;
+import gregtech.api.util.GT_Utility;
import pers.gwyog.gtneioreplugin.plugin.PluginBase;
import pers.gwyog.gtneioreplugin.plugin.item.ItemDimensionDisplay;
import pers.gwyog.gtneioreplugin.util.GT5UndergroundFluidHelper;
import pers.gwyog.gtneioreplugin.util.GT5UndergroundFluidHelper.UndergroundFluidWrapper;
-import codechicken.lib.gui.GuiDraw;
-import codechicken.nei.PositionedStack;
-import gregtech.api.util.GT_Utility;
public class PluginGT5UndergroundFluid extends PluginBase {
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java
index 52fc458246..556e32fcfe 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java
@@ -11,12 +11,12 @@ import java.util.List;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
+import codechicken.nei.PositionedStack;
+import cpw.mods.fml.common.Loader;
import pers.gwyog.gtneioreplugin.plugin.item.ItemDimensionDisplay;
import pers.gwyog.gtneioreplugin.util.DimensionHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper.OreLayerWrapper;
-import codechicken.nei.PositionedStack;
-import cpw.mods.fml.common.Loader;
public class PluginGT5VeinStat extends PluginGT5Base {
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java
index 6595929e89..b999b8eab0 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java
@@ -9,13 +9,13 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.MinecraftForgeClient;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
import pers.gwyog.gtneioreplugin.plugin.block.BlockDimensionDisplay;
import pers.gwyog.gtneioreplugin.plugin.block.ModBlocks;
import pers.gwyog.gtneioreplugin.plugin.renderer.ItemDimensionDisplayRenderer;
import pers.gwyog.gtneioreplugin.util.DimensionHelper;
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.relauncher.Side;
public class ItemDimensionDisplay extends ItemBlock {
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java b/src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java
index 05279919e6..96af04051e 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java
@@ -8,15 +8,15 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
-import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5VeinStat;
-import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper.OreLayerWrapper;
-
import com.opencsv.CSVWriter;
import com.opencsv.bean.ColumnPositionMappingStrategy;
import com.opencsv.bean.StatefulBeanToCsv;
import com.opencsv.bean.StatefulBeanToCsvBuilder;
+import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
+import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5VeinStat;
+import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper.OreLayerWrapper;
+
public class CSVMaker implements Runnable {
public CSVMaker() {}
@@ -54,14 +54,15 @@ public class CSVMaker implements Runnable {
public void runSmallOres() {
try {
- Iterator it = GT5OreSmallHelper.mapOreSmallWrapper.entrySet().iterator();
- List<Oremix> OreVeins = new ArrayList();
+ Iterator<Map.Entry<String, GT5OreSmallHelper.OreSmallWrapper>> it = GT5OreSmallHelper.mapOreSmallWrapper
+ .entrySet().iterator();
+ List<Oremix> OreVeins = new ArrayList<>();
while (it.hasNext()) {
Oremix oremix = new Oremix();
- Map.Entry pair = (Map.Entry) it.next();
+ Map.Entry<String, GT5OreSmallHelper.OreSmallWrapper> pair = it.next();
String Dims = GT5OreSmallHelper.bufferedDims.get(pair.getValue());
- GT5OreSmallHelper.OreSmallWrapper oreLayer = (GT5OreSmallHelper.OreSmallWrapper) pair.getValue();
+ GT5OreSmallHelper.OreSmallWrapper oreLayer = pair.getValue();
oremix.setOreName(oreLayer.oreGenName.split("\\.")[2]);
oremix.setHeight(oreLayer.worldGenHeightRange);
oremix.setDensity(oreLayer.amountPerChunk);
@@ -105,14 +106,14 @@ public class CSVMaker implements Runnable {
it.remove(); // avoids a ConcurrentModificationException
}
BufferedWriter one = Files.newBufferedWriter(Paths.get(GTNEIOrePlugin.CSVnameSmall));
- ColumnPositionMappingStrategy strat = new ColumnPositionMappingStrategy();
+ ColumnPositionMappingStrategy<Oremix> strat = new ColumnPositionMappingStrategy<>();
strat.setType(Oremix.class);
String[] columns = "ORENAME,mix,DENSITY,overworld,nether,end,ea,tf,mo,ma,ph,de,as,ce,eu,ga,ca,io,ve,me,en,ti,mi,ob,pr,tr,pl,kb,ha,make,dd,cb,vb,bc,be,bf,tcetie"
.split("\\,");
strat.setColumnMapping(columns);
- StatefulBeanToCsv<Oremix> beanToCsv = new StatefulBeanToCsvBuilder(one)
+ StatefulBeanToCsv<Oremix> beanToCsv = new StatefulBeanToCsvBuilder<Oremix>(one)
.withQuotechar(CSVWriter.NO_QUOTE_CHARACTER).withMappingStrategy(strat).build();
- List towrite = Combsort(OreVeins);
+ List<Oremix> towrite = Combsort(OreVeins);
one.write(
"Ore Name,Primary,Secondary,Inbetween,Around,ID,Tier,Height,Density,Size,Weight,Overworld,Nether,End,End Asteroids,Twilight Forest,Moon,Mars,Phobos,Deimos,Asteroids,Ceres,Europa,Ganymede,Callisto,Io,Venus,Mercury,Enceladus,Titan,Miranda,Oberon,Proteus,Triton,Pluto,Kuiper Belt,Haumea,Makemake,Deep Dark,Centauri Bb,Vega B,Barnard C,Barnard E,Barnard F,T Ceti E");
one.newLine();
@@ -132,14 +133,15 @@ public class CSVMaker implements Runnable {
public void runVeins() {
try {
- Iterator it = GT5OreLayerHelper.mapOreLayerWrapper.entrySet().iterator();
- List<Oremix> OreVeins = new ArrayList();
+ Iterator<Map.Entry<String, OreLayerWrapper>> it = GT5OreLayerHelper.mapOreLayerWrapper.entrySet()
+ .iterator();
+ List<Oremix> OreVeins = new ArrayList<>();
while (it.hasNext()) {
Oremix oremix = new Oremix();
- Map.Entry pair = (Map.Entry) it.next();
+ Map.Entry<String, OreLayerWrapper> pair = it.next();
String Dims = GT5OreLayerHelper.bufferedDims.get(pair.getValue());
- OreLayerWrapper oreLayer = (OreLayerWrapper) pair.getValue();
+ OreLayerWrapper oreLayer = pair.getValue();
oremix.setOreName(oreLayer.veinName.split("\\.")[2]);
oremix.setPrimary(PluginGT5VeinStat.getGTOreLocalizedName(oreLayer.Meta[0]));
oremix.setSecondary(PluginGT5VeinStat.getGTOreLocalizedName(oreLayer.Meta[1]));
@@ -196,14 +198,14 @@ public class CSVMaker implements Runnable {
it.remove(); // avoids a ConcurrentModificationException
}
BufferedWriter one = Files.newBufferedWriter(Paths.get(GTNEIOrePlugin.CSVname));
- ColumnPositionMappingStrategy strat = new ColumnPositionMappingStrategy();
+ ColumnPositionMappingStrategy<Oremix> strat = new ColumnPositionMappingStrategy<>();
strat.setType(Oremix.class);
String[] columns = "ORENAME,PRIMARY,SECONDARY,INBETWEEN,AROUND,mix,TIER,HEIGHT,DENSITY,SIZE,WEIGHT,overworld,nether,end,ea,tf,mo,ma,ph,de,as,ce,eu,ga,ca,io,ve,me,en,ti,mi,ob,pr,tr,pl,kb,ha,make,dd,cb,vb,bc,be,bf,tcetie"
.split("\\,");
strat.setColumnMapping(columns);
- StatefulBeanToCsv<Oremix> beanToCsv = new StatefulBeanToCsvBuilder(one)
+ StatefulBeanToCsv<Oremix> beanToCsv = new StatefulBeanToCsvBuilder<Oremix>(one)
.withQuotechar(CSVWriter.NO_QUOTE_CHARACTER).withMappingStrategy(strat).build();
- List towrite = Combsort(OreVeins);
+ List<Oremix> towrite = Combsort(OreVeins);
one.write(
"Ore Name,Primary,Secondary,Inbetween,Around,ID,Tier,Height,Density,Size,Weight,Overworld,Nether,End,End Asteroids,Twilight Forest,Moon,Mars,Phobos,Deimos,Asteroids,Ceres,Europa,Ganymede,Callisto,Io,Venus,Mercury,Enceladus,Titan,Miranda,Oberon,Proteus,Triton,Pluto,Kuiper Belt,Haumea,Makemake,Deep Dark,Centauri Bb,Vega B,Barnard C,Barnard E,Barnard F,T Ceti E");
one.newLine();
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5CFGHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5CFGHelper.java
index 3660d9877e..e6aecb3d85 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5CFGHelper.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5CFGHelper.java
@@ -12,9 +12,9 @@ import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
-import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
import cpw.mods.fml.common.FMLLog;
import gregtech.api.GregTech_API;
+import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
public class GT5CFGHelper {
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java
index 99308c42ce..3d673a4db7 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java
@@ -2,7 +2,6 @@ package pers.gwyog.gtneioreplugin.util;
import static pers.gwyog.gtneioreplugin.util.GT5CFGHelper.oreVeinNotInAnyDim;
-import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -152,12 +151,12 @@ public class GT5OreSmallHelper {
} catch (ClassNotFoundException e) {}
if (clazzGTOreSmall != null) {
try {
- Field fieldRestrictBiome = clazzGTOreSmall.getField("mRestrictBiome");
+ clazzGTOreSmall.getField("mRestrictBiome");
restrictBiomeSupport = true;
} catch (Exception e) {}
try {
- Field fieldGCMoon = clazzGTOreSmall.getField("mMoon");
- Field fieldGCMars = clazzGTOreSmall.getField("mMars");
+ clazzGTOreSmall.getField("mMoon");
+ clazzGTOreSmall.getField("mMars");
gcBasicSupport = true;
} catch (Exception e) {}
}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5UndergroundFluidHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5UndergroundFluidHelper.java
index 171ee195a2..5b80d4010f 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/util/GT5UndergroundFluidHelper.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GT5UndergroundFluidHelper.java
@@ -58,7 +58,7 @@ public class GT5UndergroundFluidHelper {
loop: for (Class<? extends WorldProvider> candidate : dimensionCandidates) {
for (int i = 0; i < DimensionHelper.DimNameTrimmed.length; i++) {
if (DimensionHelper.DimNameTrimmed[i]
- .equalsIgnoreCase(candidate.newInstance().getDimensionName())) {
+ .equalsIgnoreCase(candidate.getConstructor().newInstance().getDimensionName())) {
dimension = DimensionHelper.DimNameDisplayed[i];
break loop;
}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GuiRecipeHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GuiRecipeHelper.java
index 29eaf8c9f4..a16524ab28 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/util/GuiRecipeHelper.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GuiRecipeHelper.java
@@ -24,7 +24,7 @@ public class GuiRecipeHelper {
* @param gui GuiRecipe object
* @return Integer value of the xSize field of that object
*/
- public static int getXSize(GuiRecipe gui) {
+ public static int getXSize(GuiRecipe<?> gui) {
if (xSizeField != null) {
try {
return (int) xSizeField.get(gui);
@@ -43,7 +43,7 @@ public class GuiRecipeHelper {
* @param gui GuiRecipe object
* @return Integer value of the guiLeft field of that object
*/
- public static int getGuiLeft(GuiRecipe gui) {
+ public static int getGuiLeft(GuiRecipe<?> gui) {
if (guiLeftField != null) {
try {
return (int) guiLeftField.get(gui);
@@ -62,7 +62,7 @@ public class GuiRecipeHelper {
* @param gui GuiRecipe object
* @return Integer value of the guiTop field of that object
*/
- public static int getGuiTop(GuiRecipe gui) {
+ public static int getGuiTop(GuiRecipe<?> gui) {
if (guiTopField != null) {
try {
return (int) guiTopField.get(gui);
@@ -81,6 +81,7 @@ public class GuiRecipeHelper {
* Initialize the GuiRecipe Field accessors through reflection
*/
public GuiRecipeHelper() {
+ @SuppressWarnings("rawtypes")
Class<GuiRecipe> guiRecipeClass = GuiRecipe.class;
try {
guiLeftField = guiRecipeClass.getField("guiLeft");