mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-25 22:34:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e20ae4f103 | ||
|
|
fe84247b9e | ||
|
|
0a55e842b1 |
No files matched your search
+182
-140
@@ -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 = """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2">
|
||||
<output url="file://\$PROJECT_DIR\$/out" />
|
||||
</component>
|
||||
</project>
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<String, String> 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) {
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.41.195:dev'
|
||||
compile 'com.github.GTNewHorizons:Baubles:1.0.1.14:dev'
|
||||
compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.43.07:dev'
|
||||
compile 'com.github.GTNewHorizons:Baubles:1.0.1.16:dev'
|
||||
|
||||
compile 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
||||
compile 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -10,12 +10,12 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXSparkle;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.TileElectricCloud;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXSparkle;
|
||||
|
||||
public class BlockElectricCloud extends BlockBase {
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.common.blocks.BlockAiry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.TileEntityPortableNode;
|
||||
import thaumcraft.common.blocks.BlockAiry;
|
||||
|
||||
public class BlockPortableNode extends BlockAiry {
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class CommandOutputs extends CommandBase {
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
public class EntityEnergyBall extends Entity implements IProjectile, IEntityAdditionalSpawnData {
|
||||
|
||||
|
||||
@@ -6,15 +6,16 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.MetaTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input {
|
||||
|
||||
@@ -144,12 +145,14 @@ public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection aSide,
|
||||
ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection aSide,
|
||||
ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import emt.gthandler.common.implementations.EssentiaHatch;
|
||||
import emt.tile.TileEntityEMT;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.aspects.IAspectContainer;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
import emt.gthandler.common.implementations.EssentiaHatch;
|
||||
import emt.tile.TileEntityEMT;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
|
||||
public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, IEssentiaTransport {
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import emt.gthandler.common.implementations.EssentiaHatch;
|
||||
import emt.gthandler.common.items.EMT_CasingBlock;
|
||||
@@ -23,6 +21,8 @@ import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class EMT_GT_Loader implements Runnable {
|
||||
|
||||
|
||||
@@ -13,10 +13,7 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import emt.client.gui.EMT_UITextures;
|
||||
import emt.init.EMTItems;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.enums.*;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Recipe;
|
||||
@@ -130,7 +127,7 @@ public class EMT_RecipeAdder {
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 4, 0),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaosFragment", 2, 2),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 19) },
|
||||
Materials.SpaceTime.getMolten(1440),
|
||||
MaterialsUEVplus.SpaceTime.getMolten(1440),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaoticCore", 1, 0),
|
||||
GT_Values.NF,
|
||||
3200,
|
||||
|
||||
+4
-4
@@ -11,6 +11,7 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
@@ -138,10 +139,9 @@ public class DE_Fusion_Crafter extends GT_MetaTileEntity_EnhancedMultiBlockBase<
|
||||
return tt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
|
||||
boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
|
||||
int colorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (side == facing) {
|
||||
if (aActive) return new ITexture[] { TextureFactory.of(MACHINE_CASING_MAGIC),
|
||||
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE).extFacing().build(),
|
||||
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).extFacing().glow().build() };
|
||||
|
||||
+9
-9
@@ -7,10 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import emt.gthandler.common.implementations.EssentiaHatch;
|
||||
import emt.gthandler.common.items.EMT_CasingBlock;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
@@ -23,6 +19,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.objects.XSTR;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
|
||||
public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
|
||||
@@ -63,9 +63,9 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
|
||||
boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
|
||||
int colorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (side == facing) {
|
||||
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
|
||||
new GT_RenderedTexture(
|
||||
aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE
|
||||
@@ -177,8 +177,8 @@ public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
@Override
|
||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack arg1) {
|
||||
|
||||
final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3;
|
||||
final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3;
|
||||
final int xDir = aBaseMetaTileEntity.getBackFacing().offsetX * 3;
|
||||
final int zDir = aBaseMetaTileEntity.getBackFacing().offsetZ * 3;
|
||||
|
||||
for (int x = -3; x <= 3; x++) {
|
||||
for (int z = -3; z <= 3; z++) {
|
||||
|
||||
@@ -4,8 +4,6 @@ import static thaumcraft.api.ThaumcraftApi.registerObjectTag;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.block.*;
|
||||
import emt.item.block.ItemBlockElectricCloud;
|
||||
@@ -14,6 +12,8 @@ import emt.item.block.ItemBlockMachines;
|
||||
import emt.item.block.ItemBlockSolars;
|
||||
import emt.tile.solar.Solars;
|
||||
import ic2.api.item.IC2Items;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
public class EMTBlocks {
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.EMT;
|
||||
import emt.item.ItemElectricScribingTools;
|
||||
@@ -39,6 +38,7 @@ import emt.item.tool.omnitool.ItemOmnitoolDiamond;
|
||||
import emt.item.tool.omnitool.ItemOmnitoolIron;
|
||||
import emt.item.tool.omnitool.ItemOmnitoolThaumium;
|
||||
import ic2.core.init.InternalName;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
|
||||
public class EMTItems {
|
||||
|
||||
|
||||
@@ -12,15 +12,6 @@ import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.crafting.CrucibleRecipe;
|
||||
import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.crafting.ShapedArcaneRecipe;
|
||||
import thaumcraft.api.crafting.ShapelessArcaneRecipe;
|
||||
import thaumcraft.common.blocks.ItemJarNode;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
@@ -32,6 +23,15 @@ import ic2.api.recipe.RecipeInputItemStack;
|
||||
import ic2.api.recipe.Recipes;
|
||||
import ic2.core.BasicMachineRecipeManager;
|
||||
import ic2.core.Ic2Items;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.crafting.CrucibleRecipe;
|
||||
import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.crafting.ShapedArcaneRecipe;
|
||||
import thaumcraft.api.crafting.ShapelessArcaneRecipe;
|
||||
import thaumcraft.common.blocks.ItemJarNode;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class EMTRecipes {
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ package emt.init;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTResearchAspects;
|
||||
import emt.util.EMTResearchItem;
|
||||
import ic2.api.item.IC2Items;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
|
||||
public class EMTResearches {
|
||||
|
||||
|
||||
@@ -14,6 +14,13 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.util.EMTResearchItem;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
@@ -23,13 +30,6 @@ import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.crafting.ShapedArcaneRecipe;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTResearchItem;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
|
||||
public class EMT_GTNH_Recipes_And_Researches implements Runnable {
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import thaumcraft.api.IScribeTools;
|
||||
import thaumcraft.common.items.ItemInkwell;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import thaumcraft.api.IScribeTools;
|
||||
import thaumcraft.common.items.ItemInkwell;
|
||||
|
||||
public class ItemElectricScribingTools extends ItemInkwell implements IElectricItem, IScribeTools {
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -20,6 +19,7 @@ import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.ArrowNockEvent;
|
||||
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.lib.utils.InventoryUtils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.lib.utils.InventoryUtils;
|
||||
|
||||
public class ItemMaterials extends Item {
|
||||
|
||||
|
||||
@@ -16,15 +16,15 @@ import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
|
||||
public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRunicArmor {
|
||||
|
||||
|
||||
@@ -18,11 +18,6 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -33,6 +28,11 @@ import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
|
||||
public class ItemElectricBootsTraveller extends ItemArmor
|
||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
|
||||
|
||||
@@ -21,7 +21,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -37,6 +36,7 @@ import ic2.core.audio.PositionSpec;
|
||||
import ic2.core.init.InternalName;
|
||||
import ic2.core.item.armor.ItemArmorElectric;
|
||||
import ic2.core.util.StackUtil;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor {
|
||||
|
||||
|
||||
@@ -15,11 +15,6 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
@@ -28,6 +23,11 @@ import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
|
||||
public class ItemElectricGoggles extends ItemArmor
|
||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor {
|
||||
|
||||
@@ -10,7 +10,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
@@ -19,6 +18,7 @@ import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.util.StackUtil;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisDiscountGear, IRepairable {
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import emt.util.EMTTextHelper;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
|
||||
public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
|
||||
public class ItemChargeFocus extends ItemBaseFocus {
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import emt.entity.EntityLaser;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import emt.entity.EntityLaser;
|
||||
|
||||
public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import emt.entity.EntityShield;
|
||||
import ic2.core.IC2;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import emt.entity.EntityShield;
|
||||
import ic2.core.IC2;
|
||||
|
||||
public class ItemShieldFocus extends ItemBaseFocus {
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ import java.util.Map.Entry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
|
||||
public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
|
||||
|
||||
@@ -13,15 +13,15 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.blocks.BlockCustomPlant;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.blocks.BlockCustomPlant;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
|
||||
public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.api.IRepairable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
public class ItemThorHammer extends ItemSword implements IRepairable {
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.common.entities.projectile.EntityAlumentum;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.common.entities.projectile.EntityAlumentum;
|
||||
|
||||
public class ItemThorHammerBroken extends ItemSword implements IRepairable {
|
||||
|
||||
|
||||
@@ -10,15 +10,15 @@ import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXBlockBubble;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXBlockBubble;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
|
||||
public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
|
||||
|
||||
|
||||
@@ -23,14 +23,14 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.entities.EntityFollowingItem;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.entities.EntityFollowingItem;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
|
||||
public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
|
||||
|
||||
@@ -11,17 +11,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
import thaumcraft.common.lib.research.ResearchNoteData;
|
||||
import thaumcraft.common.tiles.TileNode;
|
||||
|
||||
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
|
||||
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
|
||||
|
||||
@@ -37,6 +26,16 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMul
|
||||
import gregtech.api.render.TextureFactory;
|
||||
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
import thaumcraft.common.lib.research.ResearchNoteData;
|
||||
import thaumcraft.common.tiles.TileNode;
|
||||
|
||||
public class GT_MetaTileEntity_ResearchCompleter
|
||||
extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_ResearchCompleter> {
|
||||
@@ -132,9 +131,9 @@ public class GT_MetaTileEntity_ResearchCompleter
|
||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
if (aBaseMetaTileEntity.isClientSide()) {
|
||||
if (aBaseMetaTileEntity.isActive()) {
|
||||
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||
int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY;
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
int xDir = aBaseMetaTileEntity.getBackFacing().offsetX;
|
||||
int yDir = aBaseMetaTileEntity.getBackFacing().offsetY;
|
||||
int zDir = aBaseMetaTileEntity.getBackFacing().offsetZ;
|
||||
double xCoord = aBaseMetaTileEntity.getXCoord() + 0.5;
|
||||
double yCoord = aBaseMetaTileEntity.getYCoord() + 0.5;
|
||||
double zCoord = aBaseMetaTileEntity.getZCoord() + 0.5;
|
||||
@@ -167,9 +166,9 @@ public class GT_MetaTileEntity_ResearchCompleter
|
||||
syncTimer--;
|
||||
|
||||
IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
|
||||
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||
int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY;
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
int xDir = aBaseMetaTileEntity.getBackFacing().offsetX;
|
||||
int yDir = aBaseMetaTileEntity.getBackFacing().offsetY;
|
||||
int zDir = aBaseMetaTileEntity.getBackFacing().offsetZ;
|
||||
int i = 1;
|
||||
|
||||
// Loop through node spaces and drain them from front to back
|
||||
@@ -331,9 +330,9 @@ public class GT_MetaTileEntity_ResearchCompleter
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
|
||||
boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
|
||||
int ColorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (side == facing) {
|
||||
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
|
||||
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE).extFacing().build(),
|
||||
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE_GLOW).extFacing().glow()
|
||||
|
||||
@@ -2,13 +2,13 @@ package emt.tile;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXWisp;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXWisp;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
public class TileElectricCloud extends TileEntity {
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.ModularUITextures;
|
||||
import com.gtnewhorizons.modularui.api.forge.InvWrapper;
|
||||
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
|
||||
@@ -24,6 +22,7 @@ import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import gregtech.api.gui.modularui.GT_UITextures;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class TileEntityEtherealMacerator extends TileEntityEMT
|
||||
implements ISidedInventory, IWrenchable, ITileWithModularUI {
|
||||
|
||||
@@ -8,10 +8,6 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.ModularUITextures;
|
||||
import com.gtnewhorizons.modularui.api.forge.InvWrapper;
|
||||
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
|
||||
@@ -27,6 +23,9 @@ import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import ic2.api.energy.tile.IEnergySink;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class TileEntityIndustrialWandRecharge extends TileEntityEMT
|
||||
implements IInventory, IWrenchable, IEnergySink, ITileWithModularUI {
|
||||
|
||||
@@ -13,11 +13,6 @@ import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.*;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.ModularUITextures;
|
||||
import com.gtnewhorizons.modularui.api.drawable.Text;
|
||||
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
|
||||
@@ -40,6 +35,10 @@ import gregtech.api.interfaces.tileentity.IEnergyConnected;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
||||
import gregtech.api.net.GT_Packet_Block_Event;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.*;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource;
|
||||
|
||||
public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory, IAspectContainer, IEssentiaTransport,
|
||||
IHasWorldObjectAndCoords, IEnergyConnected, IBasicEnergyContainer, ITileWithModularUI {
|
||||
@@ -397,7 +396,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits((byte) 0, getOutputVoltage(), tEU);
|
||||
drainEnergyUnits(ForgeDirection.DOWN, getOutputVoltage(), tEU);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,7 +468,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
public boolean drainEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||
return decreaseStoredEnergyUnits(
|
||||
aVoltage * aAmperage,
|
||||
this.energySource.getEnergyStored() > aVoltage * aAmperage);
|
||||
@@ -511,17 +510,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inputEnergyFrom(byte aSide) {
|
||||
public boolean inputEnergyFrom(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsEnergyTo(byte aSide) {
|
||||
public boolean outputsEnergyTo(ForgeDirection side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -575,22 +574,22 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntityAtSide(byte aSide) {
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
public TileEntity getTileEntityAtSide(ForgeDirection side) {
|
||||
if (side == ForgeDirection.UNKNOWN) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return this.worldObj.getTileEntity(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public TileEntity getTileEntityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getTileEntityAtSide(aSide);
|
||||
return getTileEntityAtSide(side);
|
||||
}
|
||||
return getTileEntity(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getTileEntity(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -604,12 +603,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getIInventoryAtSide(byte aSide) {
|
||||
public IInventory getIInventoryAtSide(ForgeDirection side) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getIInventoryAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public IInventory getIInventoryAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -624,12 +623,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidHandler getITankContainerAtSide(byte aSide) {
|
||||
public IFluidHandler getITankContainerAtSide(ForgeDirection side) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidHandler getITankContainerAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public IFluidHandler getITankContainerAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -648,8 +647,8 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSide(byte aSide) {
|
||||
TileEntity tTileEntity = getTileEntityAtSide(aSide);
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSide(ForgeDirection side) {
|
||||
TileEntity tTileEntity = getTileEntityAtSide(side);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity) tTileEntity;
|
||||
}
|
||||
@@ -657,8 +656,8 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
TileEntity tTileEntity = getTileEntityAtSideAndDistance(aSide, aDistance);
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
TileEntity tTileEntity = getTileEntityAtSideAndDistance(side, aDistance);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity) tTileEntity;
|
||||
}
|
||||
@@ -676,22 +675,22 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlockAtSide(byte aSide) {
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
public Block getBlockAtSide(ForgeDirection side) {
|
||||
if (side == ForgeDirection.UNKNOWN) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return this.worldObj.getBlock(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlockAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public Block getBlockAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getBlockAtSide(aSide);
|
||||
return getBlockAtSide(side);
|
||||
}
|
||||
return getBlock(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getBlock(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -705,19 +704,19 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSide(byte aSide) {
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
public byte getMetaIDAtSide(ForgeDirection side) {
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return (byte) this.worldObj.getBlockMetadata(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getMetaIDAtSide(aSide);
|
||||
return getMetaIDAtSide(side);
|
||||
}
|
||||
return getMetaID(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getMetaID(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -731,12 +730,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLightLevelAtSide(byte aSide) {
|
||||
public byte getLightLevelAtSide(ForgeDirection side) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLightLevelAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public byte getLightLevelAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -751,12 +750,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getOpacityAtSide(byte aSide) {
|
||||
public boolean getOpacityAtSide(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getOpacityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public boolean getOpacityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -777,12 +776,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSkyAtSide(byte aSide) {
|
||||
public boolean getSkyAtSide(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSkyAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public boolean getSkyAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -797,13 +796,13 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAirAtSide(byte aSide) {
|
||||
return getAirAtSideAndDistance(aSide, 1);
|
||||
public boolean getAirAtSide(ForgeDirection side) {
|
||||
return getAirAtSideAndDistance(side, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAirAtSideAndDistance(byte aSide, int aDistance) {
|
||||
return getAir(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
public boolean getAirAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return getAir(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -817,18 +816,18 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffsetX(byte aSide, int aMultiplier) {
|
||||
return this.xCoord + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier;
|
||||
public int getOffsetX(ForgeDirection side, int aMultiplier) {
|
||||
return this.xCoord + side.offsetX * aMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getOffsetY(byte aSide, int aMultiplier) {
|
||||
return (short) (this.yCoord + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier);
|
||||
public short getOffsetY(ForgeDirection side, int aMultiplier) {
|
||||
return (short) (this.yCoord + side.offsetY * aMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffsetZ(byte aSide, int aMultiplier) {
|
||||
return this.zCoord + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier;
|
||||
public int getOffsetZ(ForgeDirection side, int aMultiplier) {
|
||||
return this.zCoord + side.offsetZ * aMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -859,12 +858,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsEnergyTo(byte b, boolean b1) {
|
||||
public boolean outputsEnergyTo(ForgeDirection side, boolean b1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inputEnergyFrom(byte b, boolean b1) {
|
||||
public boolean inputEnergyFrom(ForgeDirection side, boolean b1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import emt.tile.DefinitelyNotAIC2Source;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public abstract class TileEntityCompressedGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.Materials;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
// Solar Factory
|
||||
public enum Solars {
|
||||
|
||||
@@ -14,9 +14,6 @@ import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.ModularUITextures;
|
||||
import com.gtnewhorizons.modularui.api.drawable.Text;
|
||||
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
|
||||
@@ -39,6 +36,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
||||
import gregtech.api.net.GT_Packet_Block_Event;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
|
||||
public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IWrenchable, IHasWorldObjectAndCoords,
|
||||
IEnergyConnected, IBasicEnergyContainer, ITileWithModularUI {
|
||||
@@ -389,7 +388,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits((byte) 0, getOutputVoltage(), tEU);
|
||||
drainEnergyUnits(ForgeDirection.DOWN, getOutputVoltage(), tEU);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,7 +485,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
public boolean drainEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||
return decreaseStoredEnergyUnits(
|
||||
aVoltage * aAmperage,
|
||||
this.energySource.getEnergyStored() > aVoltage * aAmperage);
|
||||
@@ -528,17 +527,17 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inputEnergyFrom(byte aSide) {
|
||||
public boolean inputEnergyFrom(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsEnergyTo(byte aSide) {
|
||||
public boolean outputsEnergyTo(ForgeDirection side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -592,22 +591,22 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntityAtSide(byte aSide) {
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
public TileEntity getTileEntityAtSide(ForgeDirection side) {
|
||||
if (side == ForgeDirection.UNKNOWN) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return this.worldObj.getTileEntity(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public TileEntity getTileEntityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getTileEntityAtSide(aSide);
|
||||
return getTileEntityAtSide(side);
|
||||
}
|
||||
return getTileEntity(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getTileEntity(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -621,12 +620,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getIInventoryAtSide(byte aSide) {
|
||||
public IInventory getIInventoryAtSide(ForgeDirection side) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getIInventoryAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public IInventory getIInventoryAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -641,12 +640,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidHandler getITankContainerAtSide(byte aSide) {
|
||||
public IFluidHandler getITankContainerAtSide(ForgeDirection side) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidHandler getITankContainerAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public IFluidHandler getITankContainerAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -665,8 +664,8 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSide(byte aSide) {
|
||||
TileEntity tTileEntity = getTileEntityAtSide(aSide);
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSide(ForgeDirection side) {
|
||||
TileEntity tTileEntity = getTileEntityAtSide(side);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity) tTileEntity;
|
||||
}
|
||||
@@ -674,8 +673,8 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
TileEntity tTileEntity = getTileEntityAtSideAndDistance(aSide, aDistance);
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
TileEntity tTileEntity = getTileEntityAtSideAndDistance(side, aDistance);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity) tTileEntity;
|
||||
}
|
||||
@@ -693,22 +692,22 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlockAtSide(byte aSide) {
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
public Block getBlockAtSide(ForgeDirection side) {
|
||||
if (side == ForgeDirection.UNKNOWN) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return this.worldObj.getBlock(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlockAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public Block getBlockAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getBlockAtSide(aSide);
|
||||
return getBlockAtSide(side);
|
||||
}
|
||||
return getBlock(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getBlock(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -722,19 +721,19 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSide(byte aSide) {
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
public byte getMetaIDAtSide(ForgeDirection side) {
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return (byte) this.worldObj.getBlockMetadata(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getMetaIDAtSide(aSide);
|
||||
return getMetaIDAtSide(side);
|
||||
}
|
||||
return getMetaID(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getMetaID(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -748,12 +747,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLightLevelAtSide(byte aSide) {
|
||||
public byte getLightLevelAtSide(ForgeDirection side) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLightLevelAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public byte getLightLevelAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -768,12 +767,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getOpacityAtSide(byte aSide) {
|
||||
public boolean getOpacityAtSide(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getOpacityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public boolean getOpacityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -794,12 +793,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSkyAtSide(byte aSide) {
|
||||
public boolean getSkyAtSide(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSkyAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public boolean getSkyAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -814,13 +813,13 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAirAtSide(byte aSide) {
|
||||
return getAirAtSideAndDistance(aSide, 1);
|
||||
public boolean getAirAtSide(ForgeDirection side) {
|
||||
return getAirAtSideAndDistance(side, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAirAtSideAndDistance(byte aSide, int aDistance) {
|
||||
return getAir(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
public boolean getAirAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return getAir(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -834,18 +833,18 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffsetX(byte aSide, int aMultiplier) {
|
||||
return this.xCoord + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier;
|
||||
public int getOffsetX(ForgeDirection side, int aMultiplier) {
|
||||
return this.xCoord + side.offsetX * aMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getOffsetY(byte aSide, int aMultiplier) {
|
||||
return (short) (this.yCoord + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier);
|
||||
public short getOffsetY(ForgeDirection side, int aMultiplier) {
|
||||
return (short) (this.yCoord + side.offsetY * aMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffsetZ(byte aSide, int aMultiplier) {
|
||||
return this.zCoord + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier;
|
||||
public int getOffsetZ(ForgeDirection side, int aMultiplier) {
|
||||
return this.zCoord + side.offsetZ * aMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -876,12 +875,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsEnergyTo(byte b, boolean b1) {
|
||||
public boolean outputsEnergyTo(ForgeDirection b, boolean b1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inputEnergyFrom(byte b, boolean b1) {
|
||||
public boolean inputEnergyFrom(ForgeDirection b, boolean b1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.entities.monster.EntityTaintChicken;
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
@@ -24,6 +22,8 @@ import emt.init.EMTBlocks;
|
||||
import emt.init.EMTItems;
|
||||
import emt.item.armor.wings.ItemFeatherWing;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.entities.monster.EntityTaintChicken;
|
||||
|
||||
public class EMTEventHandler {
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ package emt.util;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.api.research.ResearchPage.PageType;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EMTResearchItem extends ResearchItem {
|
||||
|
||||
|
||||
Reference in new issue
Block a user