diff --git a/build.gradle b/build.gradle index b80893052..17e7501a2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1676031737 +//version: 1682616243 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -6,32 +6,28 @@ */ -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.jetbrains.gradle.ext.* +import org.gradle.internal.xml.XmlTransformer +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 { - mavenLocal() mavenCentral() maven { @@ -52,6 +48,8 @@ buildscript { name 'Scala CI dependencies' url 'https://repo1.maven.org/maven2/' } + + mavenLocal() } } plugins { @@ -63,22 +61,23 @@ 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.1.6' + id 'com.gtnewhorizons.retrofuturagradle' version '1.3.7' } 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' } @@ -127,7 +126,10 @@ propertyDefaultIfUnset("gradleTokenGroupName", "") propertyDefaultIfUnset("enableModernJavaSyntax", false) // On by default for new projects only propertyDefaultIfUnset("enableGenericInjection", false) // On by default for new projects only -project.extensions.add(Blowdryer, "Blowdryer", Blowdryer) // Make blowdryer available in "apply from:" scripts +// 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(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') @@ -148,13 +150,21 @@ java { } else { languageVersion.set(projectJavaVersion) } - vendor.set(JvmVendorSpec.ADOPTIUM) + vendor.set(JvmVendorSpec.AZUL) } if (!noPublishedSources) { withSourcesJar() } } +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 { @@ -188,6 +198,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()) { @@ -217,7 +235,7 @@ if (enableModernJavaSyntax.toBoolean()) { javaCompiler.set(javaToolchains.compilerFor { languageVersion.set(JavaLanguageVersion.of(17)) - vendor.set(JvmVendorSpec.ADOPTIUM) + vendor.set(JvmVendorSpec.AZUL) }) } } @@ -249,12 +267,14 @@ if (apiPackage) { } if (accessTransformersFile) { - String targetFile = "src/main/resources/META-INF/" + accessTransformersFile - if (!getFile(targetFile).exists()) { - throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile) + for (atFile in accessTransformersFile.split(",")) { + String targetFile = "src/main/resources/META-INF/" + atFile.trim() + if (!getFile(targetFile).exists()) { + throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile) + } + tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(targetFile) + tasks.srgifyBinpatchedJar.accessTransformerFiles.from(targetFile) } - tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(targetFile) - tasks.srgifyBinpatchedJar.accessTransformerFiles.from(targetFile) } else { boolean atsFound = false for (File at : sourceSets.getByName("main").resources.files) { @@ -382,12 +402,14 @@ minecraft { injectMissingGenerics.set(true) } + username = developmentEnvironmentUserName.toString() + + 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", @@ -455,8 +477,9 @@ repositories.configureEach { repo -> apply from: 'repositories.gradle' configurations { + runtimeClasspath.extendsFrom(runtimeOnlyNonPublishable) + testRuntimeClasspath.extendsFrom(runtimeOnlyNonPublishable) for (config in [compileClasspath, runtimeClasspath, testCompileClasspath, testRuntimeClasspath]) { - config.extendsFrom(runtimeOnlyNonPublishable) if (usesShadowedDependencies.toBoolean()) { config.extendsFrom(shadowImplementation) // TODO: remove Compile after all uses are refactored to Implementation @@ -501,12 +524,11 @@ 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/' + content { + includeGroup "org.lwjgl" } } if (includeWellKnownRepositories.toBoolean()) { @@ -540,29 +562,49 @@ repositories { } } +def mixinProviderGroup = "io.github.legacymoddingmc" +def mixinProviderModule = "unimixins" +def mixinProviderVersion = "0.1.6" +def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}" +def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev" + 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.12: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.12') + 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.12: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' @@ -667,17 +709,22 @@ ext.java17Toolchain = (JavaToolchainSpec spec) -> { spec.vendor.set(JvmVendorSpec.matching("jetbrains")) } -ext.java17DependenciesCfg = configurations.create("java17Dependencies") -ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies") +ext.java17DependenciesCfg = configurations.create("java17Dependencies") { + extendsFrom(configurations.getByName("runtimeClasspath")) // Ensure consistent transitive dependency resolution + canBeConsumed = false +} +ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies") { + canBeConsumed = false +} dependencies { - def lwjgl3ifyVersion = '1.1.21' + 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.31') + java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.8') } java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false} @@ -688,14 +735,14 @@ dependencies { 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") + java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false} } ext.java17JvmArgs = [ // Java 9+ support "--illegal-access=warn", - "-Dfile.encoding=UTF-8", "-Djava.security.manager=allow", + "-Dfile.encoding=UTF-8", "--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", @@ -706,6 +753,7 @@ ext.java17JvmArgs = [ "--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", "jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED,java.naming", "--add-opens", "java.desktop/sun.awt.image=ALL-UNNAMED", "--add-modules", "jdk.dynalink", "--add-opens", "jdk.dynalink/jdk.dynalink.beans=ALL-UNNAMED", @@ -750,8 +798,8 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask { public boolean setEnableHotswap(boolean enable) { enableHotswap = enable } @Inject - public RunHotswappableMinecraftTask(Side side, String superTask) { - super(side) + public RunHotswappableMinecraftTask(Distribution side, String superTask, org.gradle.api.invocation.Gradle gradle) { + super(side, gradle) this.lwjglVersion = 3 this.javaLauncher = project.javaToolchains.launcherFor(project.java17Toolchain) @@ -759,7 +807,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 @@ -768,23 +816,21 @@ 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") - } } } -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" description = "Runs the modded client using Java 17, lwjgl3ify and Hodgepodge" dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar') mainClass = "GradleStart" + username = minecraft.username + 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" @@ -825,11 +871,6 @@ tasks.named("jar", Jar).configure { } if (usesShadowedDependencies.toBoolean()) { - tasks.register('relocateShadowJar', ConfigureShadowRelocation) { - target = tasks.shadowJar - prefix = modGroup + ".shadow" - enabled = minimizeShadowedDependencies.toBoolean() - } tasks.named("shadowJar", ShadowJar).configure { manifest { attributes(getManifestAttributes()) @@ -844,8 +885,9 @@ if (usesShadowedDependencies.toBoolean()) { project.configurations.shadeCompile ] archiveClassifier.set('dev') - if (minimizeShadowedDependencies.toBoolean()) { - dependsOn(relocateShadowJar) + if (relocateShadowedDependencies.toBoolean()) { + relocationPrefix = modGroup + ".shadow" + enableRelocation = true } } configurations.runtimeElements.outgoing.artifacts.clear() @@ -905,6 +947,19 @@ idea { } project { settings { + if (ideaOverrideBuildType != "") { + delegateActions { + if ("gradle".equalsIgnoreCase(ideaOverrideBuildType)) { + delegateBuildRunToGradle = true + testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.GRADLE + } else if ("idea".equalsIgnoreCase(ideaOverrideBuildType)) { + delegateBuildRunToGradle = false + testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.PLATFORM + } else { + throw GradleScriptException('Accepted value for ideaOverrideBuildType is one of gradle or idea.') + } + } + } runConfigurations { "1. Run Client"(Gradle) { taskNames = ["runClient"] @@ -943,7 +998,7 @@ idea { } "Run Client (IJ Native)"(Application) { mainClass = "GradleStart" - moduleName = project.name + ".main" + moduleName = project.name + ".ideVirtualMain" afterEvaluate { workingDirectory = tasks.runClient.workingDir.absolutePath programParameters = tasks.runClient.calculateArgs(project).collect { '"' + it + '"' }.join(' ') @@ -954,7 +1009,7 @@ idea { } "Run Server (IJ Native)"(Application) { mainClass = "GradleStartServer" - moduleName = project.name + ".main" + moduleName = project.name + ".ideVirtualMain" afterEvaluate { workingDirectory = tasks.runServer.workingDir.absolutePath programParameters = tasks.runServer.calculateArgs(project).collect { '"' + it + '"' }.join(' ') @@ -966,11 +1021,57 @@ idea { } compiler.javac { afterEvaluate { + javacAdditionalOptions = "-encoding utf8" moduleJavacAdditionalOptions = [ (project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ') ] } } + withIDEADir { File ideaDir -> + if (!ideaDir.path.contains(".idea")) { + // If an .ipr file exists, the project root directory is passed here instead of the .idea subdirectory + ideaDir = new File(ideaDir, ".idea") + } + if (ideaDir.isDirectory()) { + def miscFile = new File(ideaDir, "misc.xml") + if (miscFile.isFile()) { + boolean dirty = false + def miscTransformer = new XmlTransformer() + miscTransformer.addAction { root -> + Node rootNode = root.asNode() + def rootManager = rootNode + .component.find { it.@name == 'ProjectRootManager' } + if (!rootManager) { + rootManager = rootNode.appendNode('component', ['name': 'ProjectRootManager', 'version': '2']) + dirty = true + } + def output = rootManager.output + if (!output) { + output = rootManager.appendNode('output') + dirty = true + } + if (!output.@url) { + // Only modify the output url if it doesn't yet have one, or if the existing one is blank somehow. + // This is a sensible default for most setups + output.@url = 'file://$PROJECT_DIR$/build/ideaBuild' + dirty = true + } + } + def result = miscTransformer.transform(miscFile.text) + if (dirty) { + miscFile.write(result) + } + } else { + miscFile.text = """ + + + + + +""" + } + } + } } } } @@ -1040,7 +1141,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) @@ -1084,7 +1185,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) @@ -1118,10 +1219,21 @@ def addCurseForgeRelation(String type, String name) { } // Updating + +def buildscriptGradleVersion = "8.1.1" + +tasks.named('wrapper', Wrapper).configure { + gradleVersion = buildscriptGradleVersion +} + tasks.register('updateBuildScript') { group = 'GTNH Buildscript' description = 'Updates the build script to the latest version' + if (gradle.gradleVersion != buildscriptGradleVersion && !Boolean.getBoolean('DISABLE_BUILDSCRIPT_GRADLE_UPDATE')) { + dependsOn('wrapper') + } + doLast { if (performBuildScriptUpdate()) return @@ -1134,6 +1246,9 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA performBuildScriptUpdate() } else { out.style(Style.SuccessHeader).println("Build script update available! Run 'gradle updateBuildScript'") + if (gradle.gradleVersion != buildscriptGradleVersion) { + out.style(Style.SuccessHeader).println("updateBuildScript can update gradle from ${gradle.gradleVersion} to ${buildscriptGradleVersion}\n") + } } } @@ -1274,7 +1389,7 @@ static int replaceParams(File file, Map params) { return 0 } -// Dependency Deobfuscation +// Dependency Deobfuscation (Deprecated, use the new RFG API documented in dependencies.gradle) def deobf(String sourceURL) { try { @@ -1316,11 +1431,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. @@ -1328,34 +1439,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 @@ -1363,50 +1447,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/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 706cadafc..470094961 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -36,10 +36,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import thaumcraft.api.ItemApi; -import thaumcraft.api.ThaumcraftApi; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; import WayofTime.alchemicalWizardry.api.BlockStack; import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler; import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; @@ -118,7 +114,6 @@ import WayofTime.alchemicalWizardry.common.items.ItemMailOrderCatalogue; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -import WayofTime.alchemicalWizardry.common.items.forestry.ItemBloodFrame; import WayofTime.alchemicalWizardry.common.items.sigil.holding.HoldingPacketHandler; import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth; @@ -297,6 +292,10 @@ import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; +import thaumcraft.api.ItemApi; +import thaumcraft.api.ThaumcraftApi; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; @Mod( modid = "AWWayofTime", @@ -3279,27 +3278,6 @@ public void postInit(FMLPostInitializationEvent event) { registerBMBook(); } - if (Loader.isModLoaded("Forestry")) { - isForestryLoaded = true; - - ModItems.itemBloodFrame = new ItemBloodFrame().setUnlocalizedName("bloodFrame"); - - ItemStack provenFrame = GameRegistry.findItemStack("Forestry", "frameImpregnated", 1); - - if (provenFrame != null) { - AltarRecipeRegistry.registerAltarRecipe( - new ItemStack(ModItems.itemBloodFrame), - provenFrame, - 3, - 30000, - 20, - 20, - false); - } - } else { - isForestryLoaded = false; - } - if (Loader.isModLoaded("harvestcraft")) { PamHarvestCompatRegistry.registerPamHandlers(); AlchemicalWizardry.logger.info("Loaded Harvestcraft Handlers!"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 64a207c23..4d30e6965 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -34,7 +34,6 @@ import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; import net.minecraftforge.event.entity.player.EntityInteractEvent; -import vazkii.botania.api.internal.IManaBurst; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.BloodMagicConfiguration; import WayofTime.alchemicalWizardry.api.BlockStack; @@ -59,6 +58,7 @@ import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; +import vazkii.botania.api.internal.IManaBurst; public class AlchemicalWizardryEventHooks { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/CompatChecks.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/CompatChecks.java index e016d7153..75a9513ff 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/CompatChecks.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/CompatChecks.java @@ -1,11 +1,11 @@ package WayofTime.alchemicalWizardry.common.bloodAltarUpgrade; -import WayofTime.alchemicalWizardry.api.BlockStack; - import com.cricketcraft.chisel.api.carving.CarvingUtils; import com.cricketcraft.chisel.api.carving.ICarvingGroup; import com.google.common.base.Strings; +import WayofTime.alchemicalWizardry.api.BlockStack; + public class CompatChecks { public static boolean checkChiselBlock(BlockStack blockStack, String groupName) { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java index 4ad0a3551..85daaa660 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/demonVillage/tileEntity/TEDemonPortal.java @@ -26,6 +26,9 @@ import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.ForgeDirection; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.Int3; import WayofTime.alchemicalWizardry.common.block.BlockTeleposer; @@ -40,9 +43,6 @@ import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.DemonType; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - public class TEDemonPortal extends TileEntity { public DemonType type = DemonType.FIRE; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java index a16f9014c..8c18fd3f9 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundAxe.java @@ -19,13 +19,12 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; +import com.google.common.collect.HashMultiset; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.ItemType; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -import com.google.common.collect.HashMultiset; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java index af8fd990b..e0ae49de1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundPickaxe.java @@ -19,14 +19,13 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; +import com.google.common.collect.HashMultiset; +import com.google.common.collect.Multiset; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.ItemType; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -import com.google.common.collect.HashMultiset; -import com.google.common.collect.Multiset; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java index 832fa4486..e05b3ebe1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/BoundShovel.java @@ -20,14 +20,13 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; +import com.google.common.collect.HashMultiset; +import com.google.common.collect.Multimap; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; import WayofTime.alchemicalWizardry.common.ItemType; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -import com.google.common.collect.HashMultiset; -import com.google.common.collect.Multimap; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java index 50949e5b3..f574432a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/DaggerOfSacrifice.java @@ -17,14 +17,13 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import com.google.common.collect.Multimap; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.api.tile.IBloodAltar; import WayofTime.alchemicalWizardry.common.IDemon; import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -import com.google.common.collect.Multimap; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java index d1db40ca0..1b4a45238 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/BoundArmour.java @@ -20,9 +20,6 @@ import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.util.Constants; -import thaumcraft.api.IGoggles; -import thaumcraft.api.IRunicArmor; -import thaumcraft.api.nodes.IRevealer; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModItems; import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles; @@ -36,6 +33,9 @@ import cpw.mods.fml.common.Optional.Interface; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import thaumcraft.api.IGoggles; +import thaumcraft.api.IRunicArmor; +import thaumcraft.api.nodes.IRevealer; @Optional.InterfaceList( value = { @Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"), diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java index 4f619d8ef..cd4a8daed 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourEarth.java @@ -10,12 +10,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth; - import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaEarth; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java index 704a6f2ee..ad36eccf2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourFire.java @@ -12,12 +12,11 @@ import net.minecraft.util.IIcon; import net.minecraft.world.biome.BiomeGenBase; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire; - import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaFire; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java index 4ba67151d..02030b0b0 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWater.java @@ -11,12 +11,11 @@ import net.minecraft.util.IIcon; import net.minecraft.world.biome.BiomeGenBase; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater; - import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java index d345cfd44..8a5d26043 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/armour/OmegaArmourWind.java @@ -10,12 +10,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind; - import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWind; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java deleted file mode 100644 index 05ea2b758..000000000 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/forestry/ItemBloodFrame.java +++ /dev/null @@ -1,130 +0,0 @@ -package WayofTime.alchemicalWizardry.common.items.forestry; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import forestry.api.apiculture.*; - -public class ItemBloodFrame extends EnergyItems implements IHiveFrame { - - private final IBeeModifier beeModifier = new BloodFrameBeeModifier(); - - public ItemBloodFrame() { - super(); - this.maxStackSize = 1; - this.setMaxDamage(10); - setEnergyUsed(1000); - setCreativeTab(AlchemicalWizardry.tabBloodMagic); - } - - private static class BloodFrameBeeModifier implements IBeeModifier { - - @Override - public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) { - return 1; - } - - @Override - public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) { - return 0.0001f; - } - - @Override - public float getProductionModifier(IBeeGenome genome, float currentModifier) { - return 0; - } - - @Override - public float getFloweringModifier(IBeeGenome genome, float currentModifier) { - return 1; - } - - @Override - public float getGeneticDecay(IBeeGenome genome, float currentModifier) { - return 1; - } - - @Override - public boolean isSealed() { - return false; - } - - @Override - public boolean isSelfLighted() { - return false; - } - - @Override - public boolean isSunlightSimulated() { - return false; - } - - @Override - public boolean isHellish() { - return false; - } - - @Override - public float getTerritoryModifier(IBeeGenome genome, float currentModifier) { - return 1; - } - } - - @Override - public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { - par3List.add(StatCollector.translateToLocal("tooltip.bloodframe.desc")); - - if (!(par1ItemStack.getTagCompound() == null)) { - par3List.add( - StatCollector.translateToLocal("tooltip.owner.currentowner") + " " - + par1ItemStack.getTagCompound().getString("ownerName")); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconRegister) { - this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BloodFrame"); - } - - @Override - public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { - if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer)) { - if (par1ItemStack.getItemDamage() > 0) { - if (EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed())) { - par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1); - } - } - } - return par1ItemStack; - } - - @Override - public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear) { - // TODO Auto-generated method stub - if (EnergyItems.canSyphonInContainer(frame, getEnergyUsed() * wear)) { - EnergyItems.syphonWhileInContainer(frame, getEnergyUsed() * wear); - return frame; - } else { - frame.setItemDamage(frame.getItemDamage() + wear); - if (frame.getItemDamage() >= frame.getMaxDamage()) { - return null; - } - return frame; - } - } - - @Override - public IBeeModifier getBeeModifier() { - return beeModifier; - } -} diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java index 958209c7a..ff816beb8 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/potion/AlchemyFlask.java @@ -25,11 +25,10 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; - import com.google.common.collect.HashMultimap; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java index a39e24d7d..33bb65309 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/thaumcraft/ItemSanguineArmour.java @@ -12,17 +12,17 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModItems; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import thaumcraft.api.IGoggles; import thaumcraft.api.IRepairable; import thaumcraft.api.IRunicArmor; import thaumcraft.api.IVisDiscountGear; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.nodes.IRevealer; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.ModItems; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java index d3e72b727..c8fa6427f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/summoning/meteor/Meteor.java @@ -10,6 +10,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; + import cpw.mods.fml.common.registry.GameRegistry; public class Meteor { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index 1dc890dc9..a46ac18a3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -3,9 +3,6 @@ import java.text.NumberFormat; import java.util.List; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; - import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -42,6 +39,8 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin; import WayofTime.alchemicalWizardry.compat.IBloodMagicWailaProvider; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, IBloodAltar, IBloodMagicWailaProvider { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java index 31b223187..1d9c9df9c 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEMasterStone.java @@ -5,9 +5,6 @@ import java.util.Map; import java.util.Map.Entry; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; @@ -41,6 +38,8 @@ import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin; import WayofTime.alchemicalWizardry.compat.IBloodMagicWailaProvider; import cpw.mods.fml.common.eventhandler.Event; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; public class TEMasterStone extends TileEntity implements IMasterRitualStone, IBloodMagicWailaProvider { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java index 7e2f6f038..c52867e49 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESchematicSaver.java @@ -9,13 +9,13 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.demonVillage.BuildingSchematic; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - public class TESchematicSaver extends TileEntity { public Block targetBlock = ModBlocks.largeBloodStoneBrick; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java index 290af2def..4c214ee18 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TETeleposer.java @@ -3,9 +3,6 @@ import java.util.Iterator; import java.util.List; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; - import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; @@ -24,6 +21,8 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin; import WayofTime.alchemicalWizardry.compat.IBloodMagicWailaProvider; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; public class TETeleposer extends TEInventory implements IBloodMagicWailaProvider { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java index d1c4bbfa0..0e24ca101 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEWritingTable.java @@ -2,9 +2,6 @@ import java.util.List; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; - import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; @@ -33,6 +30,8 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.compat.BloodMagicWailaPlugin; import WayofTime.alchemicalWizardry.compat.IBloodMagicWailaProvider; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; public class TEWritingTable extends TEInventory implements ISidedInventory, IBloodMagicWailaProvider { diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java index 958b75f30..a9ef38c23 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Alchemy.java @@ -3,16 +3,15 @@ import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStacks; +import net.minecraft.item.ItemStack; + +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; +import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IItemStack; - -import net.minecraft.item.ItemStack; - import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe; -import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry; /** * MineTweaker3 Alchemy Recipe Handler by joshie * diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java index 9c073460f..a58b239ef 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/Binding.java @@ -2,16 +2,15 @@ import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +import net.minecraft.item.ItemStack; + +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; +import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IItemStack; - -import net.minecraft.item.ItemStack; - import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRecipe; -import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry; /** * MineTweaker3 Binding Recipe Handler by joshie * diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java index 57def7a2b..ca9ec6226 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodAltar.java @@ -2,17 +2,16 @@ import static WayofTime.alchemicalWizardry.common.tweaker.MTHelper.toStack; +import net.minecraft.item.ItemStack; + +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; +import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IItemStack; - -import net.minecraft.item.ItemStack; - import stanhebben.zenscript.annotations.Optional; import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe; -import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry; /** * MineTweaker3 Blood Altar Recipe Handler by joshie * diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java index 2f2f133be..c719ee894 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/BloodOrb.java @@ -7,19 +7,18 @@ import java.util.ArrayList; import java.util.List; -import minetweaker.IUndoableAction; -import minetweaker.MineTweakerAPI; -import minetweaker.api.item.IIngredient; -import minetweaker.api.item.IItemStack; - import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; -import stanhebben.zenscript.annotations.ZenClass; -import stanhebben.zenscript.annotations.ZenMethod; import WayofTime.alchemicalWizardry.api.items.ShapedBloodOrbRecipe; import WayofTime.alchemicalWizardry.api.items.ShapelessBloodOrbRecipe; +import minetweaker.IUndoableAction; +import minetweaker.MineTweakerAPI; +import minetweaker.api.item.IIngredient; +import minetweaker.api.item.IItemStack; +import stanhebben.zenscript.annotations.ZenClass; +import stanhebben.zenscript.annotations.ZenMethod; /** * MineTweaker3 Blood Orb Recipe Handler by joshie * diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java index 12d4b50ba..b15266dac 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/FallingTower.java @@ -4,17 +4,16 @@ import java.util.Iterator; -import minetweaker.IUndoableAction; -import minetweaker.MineTweakerAPI; -import minetweaker.api.item.IItemStack; - import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -import stanhebben.zenscript.annotations.ZenClass; -import stanhebben.zenscript.annotations.ZenMethod; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm; import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry; +import minetweaker.IUndoableAction; +import minetweaker.MineTweakerAPI; +import minetweaker.api.item.IItemStack; +import stanhebben.zenscript.annotations.ZenClass; +import stanhebben.zenscript.annotations.ZenMethod; /** * MineTweaker3 Falling Tower Paradigm Handler by hilburn * diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java index a9620dc8f..ea7e5d646 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/HarvestMoon.java @@ -1,19 +1,18 @@ package WayofTime.alchemicalWizardry.common.tweaker; -import minetweaker.IUndoableAction; -import minetweaker.MineTweakerAPI; -import minetweaker.api.item.IItemStack; - import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.common.IPlantable; -import stanhebben.zenscript.annotations.ZenClass; -import stanhebben.zenscript.annotations.ZenMethod; import WayofTime.alchemicalWizardry.api.harvest.HarvestRegistry; import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.GenericItemStackHarvestHandler; +import minetweaker.IUndoableAction; +import minetweaker.MineTweakerAPI; +import minetweaker.api.item.IItemStack; +import stanhebben.zenscript.annotations.ZenClass; +import stanhebben.zenscript.annotations.ZenMethod; /** * MineTweaker3 Harvest Moon Handler by hilburn * diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java index 957f29be9..b44ce1162 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tweaker/MTHelper.java @@ -4,12 +4,12 @@ import java.util.ArrayList; +import net.minecraft.item.ItemStack; + import minetweaker.api.item.IIngredient; import minetweaker.api.item.IItemStack; import minetweaker.api.oredict.IOreDictEntry; -import net.minecraft.item.ItemStack; - /** * MineTweaker3 Helper by joshie * */ diff --git a/src/main/java/WayofTime/alchemicalWizardry/compat/BloodMagicWailaPlugin.java b/src/main/java/WayofTime/alchemicalWizardry/compat/BloodMagicWailaPlugin.java index cda728015..08ec5b61a 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/compat/BloodMagicWailaPlugin.java +++ b/src/main/java/WayofTime/alchemicalWizardry/compat/BloodMagicWailaPlugin.java @@ -1,12 +1,12 @@ package WayofTime.alchemicalWizardry.compat; -import mcp.mobius.waila.api.IWailaDataProvider; -import mcp.mobius.waila.api.IWailaRegistrar; import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable; import cpw.mods.fml.common.event.FMLInterModComms; +import mcp.mobius.waila.api.IWailaDataProvider; +import mcp.mobius.waila.api.IWailaRegistrar; public class BloodMagicWailaPlugin { diff --git a/src/main/java/WayofTime/alchemicalWizardry/compat/BloodMagicWailaProvider.java b/src/main/java/WayofTime/alchemicalWizardry/compat/BloodMagicWailaProvider.java index 631778dfc..4667bcb7e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/compat/BloodMagicWailaProvider.java +++ b/src/main/java/WayofTime/alchemicalWizardry/compat/BloodMagicWailaProvider.java @@ -2,16 +2,16 @@ import java.util.List; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; - import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; +import mcp.mobius.waila.api.IWailaDataProvider; + public class BloodMagicWailaProvider implements IWailaDataProvider { @Override diff --git a/src/main/java/WayofTime/alchemicalWizardry/compat/IBloodMagicWailaProvider.java b/src/main/java/WayofTime/alchemicalWizardry/compat/IBloodMagicWailaProvider.java index dd14fffcc..7220766a5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/compat/IBloodMagicWailaProvider.java +++ b/src/main/java/WayofTime/alchemicalWizardry/compat/IBloodMagicWailaProvider.java @@ -2,15 +2,15 @@ import java.util.List; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; - import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; + public interface IBloodMagicWailaProvider { default void getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor,