mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +00:00
Compare commits
8
Commits
1.2.8.14-pre
...
1.2.8.23
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d21ba33277 | ||
|
|
ab58fc5890 | ||
|
|
6ee77f5da4 | ||
|
|
d798f5df68 | ||
|
|
f3de9f25a5 | ||
|
|
a26415bf6e | ||
|
|
93ba5763f6 | ||
|
|
4f43009e93 |
No files matched your search
@@ -0,0 +1,35 @@
|
||||
* text eol=lf
|
||||
|
||||
*.jar binary
|
||||
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.tif binary
|
||||
*.tiff binary
|
||||
*.ico binary
|
||||
*.svg text
|
||||
*.eps binary
|
||||
|
||||
*.kar binary
|
||||
*.m4a binary
|
||||
*.mid binary
|
||||
*.midi binary
|
||||
*.mp3 binary
|
||||
*.ogg binary
|
||||
*.ra binary
|
||||
|
||||
*.7z binary
|
||||
*.gz binary
|
||||
*.tar binary
|
||||
*.tgz binary
|
||||
*.zip binary
|
||||
|
||||
*.patch -text
|
||||
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
*.ps1 text eol=crlf
|
||||
|
||||
*autogenerated binary
|
||||
+112
-86
@@ -1,4 +1,4 @@
|
||||
//version: 1660899027
|
||||
//version: 1661114848
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
Also, you may replace this file at any time if there is an update available.
|
||||
@@ -26,6 +26,11 @@ buildscript {
|
||||
name 'forge'
|
||||
url 'https://maven.minecraftforge.net'
|
||||
}
|
||||
maven {
|
||||
// GTNH ForgeGradle Fork
|
||||
name = "GTNH Maven"
|
||||
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
||||
}
|
||||
maven {
|
||||
name 'sonatype'
|
||||
url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
||||
@@ -34,13 +39,9 @@ buildscript {
|
||||
name 'Scala CI dependencies'
|
||||
url 'https://repo1.maven.org/maven2/'
|
||||
}
|
||||
maven {
|
||||
name 'jitpack'
|
||||
url 'https://jitpack.io'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.7'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.9'
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
@@ -49,17 +50,20 @@ plugins {
|
||||
id 'eclipse'
|
||||
id 'scala'
|
||||
id 'maven-publish'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false
|
||||
id 'org.jetbrains.kotlin.kapt' version '1.5.30' apply false
|
||||
id 'com.google.devtools.ksp' version '1.5.30-1.0.0' apply false
|
||||
id 'org.ajoberstar.grgit' version '4.1.1'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false
|
||||
id 'org.jetbrains.kotlin.kapt' version '1.5.30' apply false
|
||||
id 'com.google.devtools.ksp' version '1.5.30-1.0.0' apply false
|
||||
id 'org.ajoberstar.grgit' version '4.1.1'
|
||||
id 'com.github.johnrengelman.shadow' version '4.0.4'
|
||||
id 'com.palantir.git-version' version '0.13.0' apply false
|
||||
id 'de.undercouch.download' version '5.0.1'
|
||||
id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false
|
||||
id 'com.diffplug.spotless' version '6.7.2' apply false
|
||||
id 'com.palantir.git-version' version '0.13.0' apply false
|
||||
id 'de.undercouch.download' version '5.0.1'
|
||||
id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false
|
||||
id 'com.diffplug.spotless' version '6.7.2' apply false
|
||||
}
|
||||
verifySettingsGradle()
|
||||
boolean settingsupdated = verifySettingsGradle()
|
||||
settingsupdated = verifyGitAttributes() || settingsupdated
|
||||
if (settingsupdated)
|
||||
throw new GradleException("Settings has been updated, please re-run task.")
|
||||
|
||||
dependencies {
|
||||
implementation 'com.diffplug:blowdryer:1.6.0'
|
||||
@@ -98,7 +102,7 @@ if (!disableSpotless) {
|
||||
apply from: Blowdryer.file('spotless.gradle')
|
||||
}
|
||||
|
||||
if(JavaVersion.current() != JavaVersion.VERSION_1_8) {
|
||||
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
|
||||
throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current())
|
||||
}
|
||||
|
||||
@@ -135,53 +139,53 @@ String kotlinSourceDir = "src/main/kotlin/"
|
||||
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
|
||||
if(apiPackage) {
|
||||
if (apiPackage) {
|
||||
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
}
|
||||
|
||||
if(accessTransformersFile) {
|
||||
if (accessTransformersFile) {
|
||||
String targetFile = "src/main/resources/META-INF/" + accessTransformersFile
|
||||
if(!getFile(targetFile).exists()) {
|
||||
if (!getFile(targetFile).exists()) {
|
||||
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
|
||||
}
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
if(mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) {
|
||||
if (usesMixins.toBoolean()) {
|
||||
if (mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) {
|
||||
throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!")
|
||||
}
|
||||
|
||||
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
|
||||
String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".scala"
|
||||
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".kt"
|
||||
if(!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
|
||||
if (!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
|
||||
}
|
||||
}
|
||||
|
||||
if(coreModClass) {
|
||||
if (coreModClass) {
|
||||
String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".scala"
|
||||
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".kt"
|
||||
if(!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
|
||||
if (!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
|
||||
}
|
||||
}
|
||||
@@ -222,15 +226,14 @@ ext {
|
||||
modVersion = identifiedVersion
|
||||
}
|
||||
|
||||
if(identifiedVersion == versionOverride) {
|
||||
if (identifiedVersion == versionOverride) {
|
||||
out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7')
|
||||
}
|
||||
|
||||
group = modGroup
|
||||
if(project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
|
||||
if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
|
||||
archivesBaseName = customArchiveBaseName
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
archivesBaseName = modId
|
||||
}
|
||||
|
||||
@@ -256,16 +259,16 @@ minecraft {
|
||||
|
||||
if (replaceGradleTokenInFile) {
|
||||
replaceIn replaceGradleTokenInFile
|
||||
if(gradleTokenModId) {
|
||||
if (gradleTokenModId) {
|
||||
replace gradleTokenModId, modId
|
||||
}
|
||||
if(gradleTokenModName) {
|
||||
if (gradleTokenModName) {
|
||||
replace gradleTokenModName, modName
|
||||
}
|
||||
if(gradleTokenVersion) {
|
||||
if (gradleTokenVersion) {
|
||||
replace gradleTokenVersion, modVersion
|
||||
}
|
||||
if(gradleTokenGroupName) {
|
||||
if (gradleTokenGroupName) {
|
||||
replace gradleTokenGroupName, modGroup
|
||||
}
|
||||
}
|
||||
@@ -274,7 +277,7 @@ minecraft {
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
|
||||
if(developmentEnvironmentUserName) {
|
||||
if (developmentEnvironmentUserName) {
|
||||
args("--username", developmentEnvironmentUserName)
|
||||
}
|
||||
}
|
||||
@@ -285,7 +288,7 @@ minecraft {
|
||||
}
|
||||
}
|
||||
|
||||
if(file('addon.gradle').exists()) {
|
||||
if (file('addon.gradle').exists()) {
|
||||
apply from: 'addon.gradle'
|
||||
}
|
||||
|
||||
@@ -302,7 +305,7 @@ repositories {
|
||||
name 'Overmind forge repo mirror'
|
||||
url 'https://gregtech.overminddl1.com/'
|
||||
}
|
||||
if(usesMixins.toBoolean() || forceEnableMixins) {
|
||||
if (usesMixins.toBoolean() || forceEnableMixins) {
|
||||
maven {
|
||||
name 'sponge'
|
||||
url 'https://repo.spongepowered.org/repository/maven-public'
|
||||
@@ -314,13 +317,13 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
if(usesMixins.toBoolean()) {
|
||||
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('org.spongepowered:mixin:0.8-SNAPSHOT')
|
||||
}
|
||||
if(usesMixins.toBoolean() || forceEnableMixins) {
|
||||
if (usesMixins.toBoolean() || forceEnableMixins) {
|
||||
// using 0.8 to workaround a issue in 0.7 which fails mixin application
|
||||
compile('com.github.GTNewHorizons:SpongePoweredMixin:0.7.12-GTNH') {
|
||||
// Mixin includes a lot of dependencies that are too up-to-date
|
||||
@@ -396,20 +399,20 @@ jar {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
if(usesShadowedDependencies.toBoolean()) {
|
||||
if (usesShadowedDependencies.toBoolean()) {
|
||||
dependsOn(shadowJar)
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
reobf {
|
||||
if(usesMixins.toBoolean() && file(mixinSrg).exists()) {
|
||||
if (usesMixins.toBoolean()) {
|
||||
addExtraSrgFile mixinSrg
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
if(usesMixins.toBoolean()) {
|
||||
if (usesMixins.toBoolean()) {
|
||||
tasks.compileJava {
|
||||
options.compilerArgs += [
|
||||
"-AreobfSrgFile=${tasks.reobf.srg}",
|
||||
@@ -424,7 +427,7 @@ afterEvaluate {
|
||||
}
|
||||
|
||||
runClient {
|
||||
if(developmentEnvironmentUserName) {
|
||||
if (developmentEnvironmentUserName) {
|
||||
arguments += [
|
||||
"--username",
|
||||
developmentEnvironmentUserName
|
||||
@@ -465,7 +468,7 @@ processResources {
|
||||
"modName": modName
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
if (usesMixins.toBoolean()) {
|
||||
from refMap
|
||||
}
|
||||
|
||||
@@ -478,31 +481,31 @@ processResources {
|
||||
|
||||
def getManifestAttributes() {
|
||||
def manifestAttributes = [:]
|
||||
if(!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) {
|
||||
if (!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) {
|
||||
manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
|
||||
}
|
||||
|
||||
if(accessTransformersFile) {
|
||||
manifestAttributes += ["FMLAT" : accessTransformersFile.toString()]
|
||||
if (accessTransformersFile) {
|
||||
manifestAttributes += ["FMLAT": accessTransformersFile.toString()]
|
||||
}
|
||||
|
||||
if(coreModClass) {
|
||||
if (coreModClass) {
|
||||
manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass]
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
if (usesMixins.toBoolean()) {
|
||||
manifestAttributes += [
|
||||
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
|
||||
"MixinConfigs" : "mixins." + modId + ".json",
|
||||
"ForceLoadAsMod" : !containsMixinsAndOrCoreModOnly.toBoolean()
|
||||
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
|
||||
"MixinConfigs" : "mixins." + modId + ".json",
|
||||
"ForceLoadAsMod": !containsMixinsAndOrCoreModOnly.toBoolean()
|
||||
]
|
||||
}
|
||||
return manifestAttributes
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from (sourceSets.main.allSource)
|
||||
from (file("$projectDir/LICENSE"))
|
||||
from(sourceSets.main.allSource)
|
||||
from(file("$projectDir/LICENSE"))
|
||||
getArchiveClassifier().set('sources')
|
||||
}
|
||||
|
||||
@@ -552,22 +555,22 @@ task devJar(type: Jar) {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
if(usesShadowedDependencies.toBoolean()) {
|
||||
if (usesShadowedDependencies.toBoolean()) {
|
||||
dependsOn(circularResolverJar)
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from (sourceSets.main.allSource) {
|
||||
from(sourceSets.main.allSource) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
}
|
||||
|
||||
from (sourceSets.main.output) {
|
||||
from(sourceSets.main.output) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
}
|
||||
|
||||
from (sourceSets.main.resources.srcDirs) {
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include("LICENSE")
|
||||
}
|
||||
|
||||
@@ -575,11 +578,11 @@ task apiJar(type: Jar) {
|
||||
}
|
||||
|
||||
artifacts {
|
||||
if(!noPublishedSources) {
|
||||
if (!noPublishedSources) {
|
||||
archives sourcesJar
|
||||
}
|
||||
archives devJar
|
||||
if(apiPackage) {
|
||||
if (apiPackage) {
|
||||
archives apiJar
|
||||
}
|
||||
}
|
||||
@@ -597,10 +600,10 @@ publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
from components.java
|
||||
if(usesShadowedDependencies.toBoolean()) {
|
||||
if (usesShadowedDependencies.toBoolean()) {
|
||||
artifact source: shadowJar, classifier: ""
|
||||
}
|
||||
if(!noPublishedSources) {
|
||||
if (!noPublishedSources) {
|
||||
artifact source: sourcesJar, classifier: "sources"
|
||||
}
|
||||
artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev"
|
||||
@@ -615,7 +618,7 @@ publishing {
|
||||
|
||||
// remove extra garbage from minecraft and minecraftDeps configuration
|
||||
pom.withXml {
|
||||
def badArtifacts = [:].withDefault {[] as Set<String>}
|
||||
def badArtifacts = [:].withDefault { [] as Set<String> }
|
||||
for (configuration in [
|
||||
projectConfigs.minecraft,
|
||||
projectConfigs.minecraftDeps
|
||||
@@ -666,20 +669,40 @@ if (!project.getGradle().startParameter.isOffline() && isNewBuildScriptVersionAv
|
||||
}
|
||||
|
||||
static URL availableBuildScriptUrl() {
|
||||
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/main/build.gradle")
|
||||
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/build.gradle")
|
||||
}
|
||||
|
||||
static URL exampleSettingsGradleUrl() {
|
||||
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/main/settings.gradle.example")
|
||||
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/settings.gradle.example")
|
||||
}
|
||||
|
||||
static URL exampleGitAttributesUrl() {
|
||||
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/.gitattributes")
|
||||
}
|
||||
|
||||
|
||||
def verifySettingsGradle() {
|
||||
boolean verifyGitAttributes() {
|
||||
def gitattributesFile = getFile(".gitattributes")
|
||||
if (!gitattributesFile.exists()) {
|
||||
println("Downloading default .gitattributes")
|
||||
exampleGitAttributesUrl().withInputStream { i -> gitattributesFile.withOutputStream { it << i } }
|
||||
exec {
|
||||
workingDir '.'
|
||||
commandLine 'git', 'add', '--renormalize', '.'
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
boolean verifySettingsGradle() {
|
||||
def settingsFile = getFile("settings.gradle")
|
||||
if (!settingsFile.exists()) {
|
||||
println("Downloading default settings.gradle")
|
||||
exampleSettingsGradleUrl().withInputStream { i -> settingsFile.withOutputStream { it << i } }
|
||||
throw new GradleException("Settings.gradle has been updated, please re-run task.")
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
boolean performBuildScriptUpdate(String projectDir) {
|
||||
@@ -687,7 +710,10 @@ boolean performBuildScriptUpdate(String projectDir) {
|
||||
def buildscriptFile = getFile("build.gradle")
|
||||
availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } }
|
||||
out.style(Style.Success).print("Build script updated. Please REIMPORT the project or RESTART your IDE!")
|
||||
verifySettingsGradle()
|
||||
boolean settingsupdated = verifySettingsGradle()
|
||||
settingsupdated = verifyGitAttributes() || settingsupdated
|
||||
if (settingsupdated)
|
||||
throw new GradleException("Settings has been updated, please re-run task.")
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -707,7 +733,7 @@ boolean isNewBuildScriptVersionAvailable(String projectDir) {
|
||||
|
||||
static String getVersionHash(String buildScriptContent) {
|
||||
String versionLine = buildScriptContent.find("^//version: [a-z0-9]*")
|
||||
if(versionLine != null) {
|
||||
if (versionLine != null) {
|
||||
return versionLine.split(": ").last()
|
||||
}
|
||||
return ""
|
||||
@@ -733,16 +759,16 @@ task deobfParams {
|
||||
overwrite false
|
||||
}
|
||||
|
||||
if(!file(paramsCSV).exists()) {
|
||||
if (!file(paramsCSV).exists()) {
|
||||
println("Extracting MCP archive ...")
|
||||
unzip(mcpZIP, mcpDir)
|
||||
}
|
||||
|
||||
println("Parsing params.csv ...")
|
||||
Map<String, String> params = new HashMap<>()
|
||||
Files.lines(Paths.get(paramsCSV)).forEach{line ->
|
||||
Files.lines(Paths.get(paramsCSV)).forEach { line ->
|
||||
String[] cells = line.split(",")
|
||||
if(cells.length > 2 && cells[0].matches("p_i?\\d+_\\d+_")) {
|
||||
if (cells.length > 2 && cells[0].matches("p_i?\\d+_\\d+_")) {
|
||||
params.put(cells[0], cells[1])
|
||||
}
|
||||
}
|
||||
@@ -755,8 +781,8 @@ task deobfParams {
|
||||
static int replaceParams(File file, Map<String, String> params) {
|
||||
int fileCount = 0
|
||||
|
||||
if(file.isDirectory()) {
|
||||
for(File f : file.listFiles()) {
|
||||
if (file.isDirectory()) {
|
||||
for (File f : file.listFiles()) {
|
||||
fileCount += replaceParams(f, params)
|
||||
}
|
||||
return fileCount
|
||||
@@ -765,14 +791,14 @@ println("Visiting ${file.getName()} ...")
|
||||
try {
|
||||
String content = new String(Files.readAllBytes(file.toPath()))
|
||||
int hash = content.hashCode()
|
||||
params.forEach{key, value ->
|
||||
params.forEach { key, value ->
|
||||
content = content.replaceAll(key, value)
|
||||
}
|
||||
if(hash != content.hashCode()) {
|
||||
if (hash != content.hashCode()) {
|
||||
Files.write(file.toPath(), content.getBytes("UTF-8"))
|
||||
return 1
|
||||
}
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return 0
|
||||
@@ -823,16 +849,16 @@ try {
|
||||
|
||||
//get rid of directories:
|
||||
int lastSlash = fileName.lastIndexOf("/")
|
||||
if(lastSlash > 0) {
|
||||
if (lastSlash > 0) {
|
||||
fileName = fileName.substring(lastSlash + 1)
|
||||
}
|
||||
//get rid of extension:
|
||||
if(fileName.endsWith(".jar") || fileName.endsWith(".litemod")) {
|
||||
if (fileName.endsWith(".jar") || fileName.endsWith(".litemod")) {
|
||||
fileName = fileName.substring(0, fileName.lastIndexOf("."))
|
||||
}
|
||||
|
||||
String hostName = url.getHost()
|
||||
if(hostName.startsWith("www.")) {
|
||||
if (hostName.startsWith("www.")) {
|
||||
hostName = hostName.substring(4)
|
||||
}
|
||||
List parts = Arrays.asList(hostName.split("\\."))
|
||||
@@ -840,7 +866,7 @@ try {
|
||||
hostName = String.join(".", parts)
|
||||
|
||||
return deobf(sourceURL, "$hostName/$fileName")
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
return deobf(sourceURL, "deobf/${sourceURL.hashCode()}")
|
||||
}
|
||||
}
|
||||
@@ -855,13 +881,13 @@ 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()) {
|
||||
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) {
|
||||
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"
|
||||
|
||||
@@ -897,7 +923,7 @@ return files(deobfFile)
|
||||
|
||||
def zipMappings(String zipPath, String url, String bon2Dir) {
|
||||
File zipFile = new File(zipPath)
|
||||
if(zipFile.exists()) {
|
||||
if (zipFile.exists()) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.41.01:dev'
|
||||
compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.41.05:dev'
|
||||
compile 'com.github.GTNewHorizons:Baubles:1.0.1.14:dev'
|
||||
|
||||
compile 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
||||
|
||||
@@ -25,8 +25,8 @@ import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class EMT_GT_Loader implements Runnable {
|
||||
|
||||
public static final int TIERS = GT_Values.VN.length;
|
||||
public static int aIDoffset = 13000 - TIERS - 1;
|
||||
public static final int TIERS = GT_Values.VN.length - 1;
|
||||
public static int aIDoffset = 13000 - GT_Values.VN.length - 1;
|
||||
public static ItemStack[] EHatch = new ItemStack[TIERS];
|
||||
public static ItemStack LEG;
|
||||
public static ItemStack DECC;
|
||||
@@ -41,7 +41,8 @@ public class EMT_GT_Loader implements Runnable {
|
||||
.getStackForm(1L);
|
||||
}
|
||||
|
||||
LEG = new EMT_Large_Essentia_Gen(aIDoffset + TIERS + 1, "Large Essentia Generator", "Large Essentia Generator")
|
||||
LEG = new EMT_Large_Essentia_Gen(
|
||||
aIDoffset + GT_Values.VN.length + 1, "Large Essentia Generator", "Large Essentia Generator")
|
||||
.getStackForm(1L);
|
||||
|
||||
// Dragonblood recipe for magics haters
|
||||
@@ -200,7 +201,7 @@ public class EMT_GT_Loader implements Runnable {
|
||||
}
|
||||
|
||||
ResearchMultiblock = new GT_MetaTileEntity_ResearchCompleter(
|
||||
aIDoffset + TIERS + 2, "Research Completer", "Research Completer")
|
||||
aIDoffset + GT_Values.VN.length + 2, "Research Completer", "Research Completer")
|
||||
.getStackForm(1L);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
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.util.GT_ModHandler;
|
||||
@@ -22,8 +24,8 @@ public class EMT_RecipeAdder {
|
||||
"emt.recipe.fusioncrafting",
|
||||
"Draconic Evolution Fusion Crafter",
|
||||
null,
|
||||
RES_PATH_GUI + "basicmachines/Default",
|
||||
6,
|
||||
RES_PATH_GUI + "basicmachines/FusionCrafter",
|
||||
9,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
@@ -86,55 +88,79 @@ public class EMT_RecipeAdder {
|
||||
|
||||
// CORES
|
||||
|
||||
addFusionCraftingRecipe(
|
||||
addFusionCraftingRecipeNonOptimized(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmiridium, 4),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Ichorium, 1),
|
||||
GT_OreDictUnificator.get(OrePrefixes.gem, Materials.EnderEye, 1),
|
||||
ItemList.QuantumEye.get(1L),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 16)
|
||||
},
|
||||
Materials.Sunnarium.getMolten(1440),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0),
|
||||
GT_Values.NF,
|
||||
400,
|
||||
30720,
|
||||
500000,
|
||||
1);
|
||||
|
||||
addFusionCraftingRecipe(
|
||||
addFusionCraftingRecipeNonOptimized(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 6),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 8),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 4),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 4, 0),
|
||||
GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 17)
|
||||
ItemList.QuantumStar.get(1L),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 17),
|
||||
},
|
||||
Materials.Neutronium.getMolten(1440),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 1, 0),
|
||||
GT_Values.NF,
|
||||
800,
|
||||
65536,
|
||||
2000000,
|
||||
2);
|
||||
if (Loader.isModLoaded("supersolarpanel")) {
|
||||
addFusionCraftingRecipeNonOptimized(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 12),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 4),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 4, 0),
|
||||
GT_ModHandler.getModItem("supersolarpanel", "enderquantumcomponent", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 18)
|
||||
},
|
||||
Materials.Infinity.getMolten(1440),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 1, 0),
|
||||
GT_Values.NF,
|
||||
1600,
|
||||
8000000,
|
||||
3);
|
||||
} else {
|
||||
addFusionCraftingRecipeNonOptimized(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 12),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 4),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 4, 0),
|
||||
GT_ModHandler.getModItem("dreamcraft", "item.ManyullynCrystal", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 18)
|
||||
},
|
||||
Materials.Infinity.getMolten(1440),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 1, 0),
|
||||
GT_Values.NF,
|
||||
1600,
|
||||
8000000,
|
||||
3);
|
||||
}
|
||||
|
||||
addFusionCraftingRecipe(
|
||||
addFusionCraftingRecipeNonOptimized(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 8),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 4),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "wyvernCore", 4, 0),
|
||||
GT_ModHandler.getModItem("dreamcraft", "ManyullynCrystal", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 18)
|
||||
},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 1, 0),
|
||||
1600,
|
||||
122880,
|
||||
3);
|
||||
|
||||
addFusionCraftingRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 12),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 6),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.DraconiumAwakened, 16),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 4),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 4, 0),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaosShard", 1, 0),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaosFragment", 2, 2),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 19)
|
||||
},
|
||||
Materials.SpaceTime.getMolten(1440),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaoticCore", 1, 0),
|
||||
GT_Values.NF,
|
||||
3200,
|
||||
500000,
|
||||
24000000,
|
||||
4);
|
||||
|
||||
// ENERGY CORES
|
||||
@@ -142,14 +168,14 @@ public class EMT_RecipeAdder {
|
||||
addFusionCraftingRecipe(
|
||||
new ItemStack[] {
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Draconium, 8),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.RedstoneAlloy, 4),
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StellarAlloy, 4),
|
||||
GT_ModHandler.getModItem("AdvancedSolarPanel", "asp_crafting_items", 4, 1),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconicCore", 1, 0),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 17)
|
||||
},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 1, 0),
|
||||
1000,
|
||||
65536,
|
||||
500000,
|
||||
2);
|
||||
|
||||
addFusionCraftingRecipe(
|
||||
@@ -162,7 +188,7 @@ public class EMT_RecipeAdder {
|
||||
},
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "draconiumEnergyCore", 1, 1),
|
||||
2000,
|
||||
122880,
|
||||
2000000,
|
||||
3);
|
||||
|
||||
// Dragon Blood
|
||||
|
||||
@@ -14,11 +14,8 @@ import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.ArrowNockEvent;
|
||||
@@ -107,6 +104,15 @@ public class ItemMaterials extends Item {
|
||||
return "item." + EMT.MOD_ID + "." + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List result, boolean advanced) {
|
||||
switch (stack.getItemDamage()) {
|
||||
case 16:
|
||||
result.add(EnumChatFormatting.GOLD + StatCollector.translateToLocal("tooltip.EMT.draconicSchematic"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ri) {
|
||||
this.icon[0] = ri.registerIcon(EMT.TEXTURE_PATH + ":materials/clusteruranium");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package emt.item.block;
|
||||
|
||||
import static emt.util.EMTTextHelper.localize;
|
||||
import static gregtech.api.util.GT_Utility.formatNumbers;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.block.BlockBaseContainer;
|
||||
@@ -52,121 +53,147 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
if (instance == 0) {
|
||||
switch (itemstack.getItemDamage()) {
|
||||
case 0: {
|
||||
list.add(EMTConfigHandler.compressedSolarOutput + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(formatNumbers(EMTConfigHandler.compressedSolarOutput)
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
list.add(EMTConfigHandler.doubleCompressedSolarOutput + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
list.add(EMTConfigHandler.tripleCompressedSolarOutput + localize("tooltip.EMT.euPerTick"));
|
||||
list.add(formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
break;
|
||||
}
|
||||
case 3: { // aqua
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(2F * EMTConfigHandler.compressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(3F * EMTConfigHandler.compressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(6F * EMTConfigHandler.compressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(2F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(3F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(6F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(2F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (3F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(3F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (6F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(6F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.thunder"));
|
||||
break;
|
||||
}
|
||||
|
||||
case 6: { // dark
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(0.75F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(2F * EMTConfigHandler.compressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 7: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(2F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(2F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 9: { // ordo
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(2F * EMTConfigHandler.compressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(0.75F * EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(2F * EMTConfigHandler.doubleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(0.75F * EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
|
||||
case 11: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(2F * EMTConfigHandler.tripleCompressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ formatNumbers(0.75F * EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ " " + localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
}
|
||||
case 12: { // fire
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " "
|
||||
@@ -178,7 +205,8 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
}
|
||||
case 13: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " "
|
||||
@@ -190,7 +218,8 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
}
|
||||
case 14: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " "
|
||||
@@ -202,7 +231,7 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
}
|
||||
case 15: { // aer
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
@@ -217,7 +246,8 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
switch (itemstack.getItemDamage()) {
|
||||
case 0: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
@@ -225,7 +255,8 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
}
|
||||
case 1: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
@@ -233,7 +264,7 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
}
|
||||
case 2: { // terra
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.compressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.compressedSolarOutput) + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
@@ -241,7 +272,8 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
}
|
||||
case 3: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.doubleCompressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.doubleCompressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
@@ -249,7 +281,8 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
}
|
||||
case 4: {
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + EMTConfigHandler.tripleCompressedSolarOutput + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(EMTConfigHandler.tripleCompressedSolarOutput)
|
||||
+ " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
@@ -264,48 +297,57 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
switch (te.aspect) {
|
||||
case 1:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(2F * te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * te.output) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(0.75F * te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
case 2:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (0.75F * te.output) + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(0.75F * te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick") + " " + localize("tooltip.EMT.day"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(2F * te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.night"));
|
||||
break;
|
||||
case 3:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.height"));
|
||||
break;
|
||||
case 4:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.double.half.low"));
|
||||
break;
|
||||
case 5:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (2F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(2F * te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.underwater"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (3F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(3F * te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.raining"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + (6F * te.output) + " " + localize("tooltip.EMT.euPerTick")
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(6F * te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick")
|
||||
+ " " + localize("tooltip.EMT.thunder"));
|
||||
break;
|
||||
case 6:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
list.add(EMTTextHelper.BRIGHT_GREEN + localize("tooltip.EMT.specialEffect") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + localize("tooltip.EMT.output.triple") + " "
|
||||
+ localize("tooltip.EMT.output.double.lava"));
|
||||
@@ -315,12 +357,14 @@ public class ItemBlockSolars extends ItemBlock {
|
||||
break;
|
||||
default:
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + localize("tooltip.EMT.normalConditions") + ": "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.output + " " + localize("tooltip.EMT.euPerTick"));
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(te.output) + " "
|
||||
+ localize("tooltip.EMT.euPerTick"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
list.add(EMTTextHelper.BRIGHT_BLUE + StatCollector.translateToLocal("emt.OutputMax") + " "
|
||||
+ EMTTextHelper.LIGHT_GRAY + te.calculateMaxVoltAmp()[0] + "EU/t @ " + te.calculateMaxVoltAmp()[1]
|
||||
+ EMTTextHelper.LIGHT_GRAY + formatNumbers(te.calculateMaxVoltAmp()[0]) + "EU/t @ "
|
||||
+ formatNumbers(te.calculateMaxVoltAmp()[1])
|
||||
+ "A");
|
||||
} else list.add(StatCollector.translateToLocal("emt.PressShift"));
|
||||
}
|
||||
|
||||
@@ -1,21 +1,61 @@
|
||||
package emt.tile;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSink;
|
||||
import ic2.api.energy.tile.IEnergySink;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
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;
|
||||
|
||||
public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements IInventory, IWrenchable {
|
||||
public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements IInventory, IWrenchable, IEnergySink {
|
||||
private static final int capacity = 1000000;
|
||||
private static final int tier = 4;
|
||||
private double energyStored = 0;
|
||||
|
||||
public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public double getDemandedEnergy() {
|
||||
return Math.max(0.0D, (double) capacity - this.energyStored);
|
||||
}
|
||||
|
||||
public double injectEnergy(ForgeDirection directionFrom, double amount, double voltage) {
|
||||
if (this.getDemandedEnergy() > 0) {
|
||||
this.energyStored += amount;
|
||||
return 0.0D;
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
public int getSinkTier() {
|
||||
return tier;
|
||||
}
|
||||
|
||||
private boolean canUseEnergy(double amount) {
|
||||
return this.energyStored >= amount;
|
||||
}
|
||||
|
||||
private boolean useEnergy(double amount) {
|
||||
if (this.canUseEnergy(amount)
|
||||
&& !FMLCommonHandler.instance().getEffectiveSide().isClient()) {
|
||||
this.energyStored -= amount;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack ItemStacks[];
|
||||
private BasicSink ic2EnergySink = new BasicSink(this, 100000, 4);
|
||||
|
||||
public TileEntityIndustrialWandRecharge() {
|
||||
ItemStacks = new ItemStack[1];
|
||||
@@ -66,23 +106,21 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements I
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
ic2EnergySink.updateEntity();
|
||||
if (!this.worldObj.isRemote) {
|
||||
if (getStackInSlot(0) != null) {
|
||||
if (this.worldObj.isRemote || getStackInSlot(0) == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack wand = getStackInSlot(0);
|
||||
if (wand != null && wand.getItem() instanceof ItemWandCasting) {
|
||||
ItemWandCasting wandItem = (ItemWandCasting) wand.getItem();
|
||||
if (ic2EnergySink.useEnergy(EMTConfigHandler.wandChargerConsumption)
|
||||
&& wandItem.getAspectsWithRoom(wand) != null) {
|
||||
wandItem.addVis(wand, Aspect.ORDER, 1, true);
|
||||
wandItem.addVis(wand, Aspect.FIRE, 1, true);
|
||||
wandItem.addVis(wand, Aspect.ENTROPY, 1, true);
|
||||
wandItem.addVis(wand, Aspect.WATER, 1, true);
|
||||
wandItem.addVis(wand, Aspect.EARTH, 1, true);
|
||||
wandItem.addVis(wand, Aspect.AIR, 1, true);
|
||||
}
|
||||
}
|
||||
ItemStack wand = getStackInSlot(0);
|
||||
if (wand != null && wand.getItem() instanceof ItemWandCasting) {
|
||||
ItemWandCasting wandItem = (ItemWandCasting) wand.getItem();
|
||||
AspectList aspects = wandItem.getAspectsWithRoom((wand));
|
||||
if (aspects != null && aspects.size() != 0 && this.useEnergy(EMTConfigHandler.wandChargerConsumption)) {
|
||||
wandItem.addVis(wand, Aspect.ORDER, 1, true);
|
||||
wandItem.addVis(wand, Aspect.FIRE, 1, true);
|
||||
wandItem.addVis(wand, Aspect.ENTROPY, 1, true);
|
||||
wandItem.addVis(wand, Aspect.WATER, 1, true);
|
||||
wandItem.addVis(wand, Aspect.EARTH, 1, true);
|
||||
wandItem.addVis(wand, Aspect.AIR, 1, true);
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
}
|
||||
@@ -110,6 +148,10 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements I
|
||||
this.ItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.energyStored == 0) {
|
||||
this.energyStored = p_145839_1_.getDouble("Energy");
|
||||
}
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound p_145841_1_) {
|
||||
@@ -126,6 +168,7 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements I
|
||||
}
|
||||
|
||||
p_145841_1_.setTag("Items", nbttaglist);
|
||||
p_145841_1_.setDouble("Energy", this.energyStored);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -147,17 +190,6 @@ public class TileEntityIndustrialWandRecharge extends TileEntityEMT implements I
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
ic2EnergySink.invalidate();
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
ic2EnergySink.onChunkUnload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "Industrial Wand Charging Station";
|
||||
|
||||
@@ -41,6 +41,7 @@ tooltip.EMT.output.double.nether=wenn es im Nether steht
|
||||
tooltip.EMT.output.double.lava=wenn mit Ignis Centivis befüllt
|
||||
tooltip.EMT.output.double.half.height=höhere Leistung in Höhen (x1 bei y=5, x3 bei y=220)
|
||||
tooltip.EMT.output.double.half.low=höhere Leistung in Tiefen (x1 bei y=220, x3 bei y=5)
|
||||
tooltip.EMT.draconicSchematic=Diesen Bauplan kann man in Pluto Dungeons finden
|
||||
|
||||
#=============Entity Names=============
|
||||
entity.EMT.laser.name=Laser
|
||||
|
||||
@@ -43,6 +43,7 @@ tooltip.EMT.output.double.nether=when located in the Nether
|
||||
tooltip.EMT.output.double.lava=when fed with Ignis Centivis
|
||||
tooltip.EMT.output.double.half.height=Higher output at heights (x1 at y = 5, x3 at y=220)
|
||||
tooltip.EMT.output.double.half.low=Higher output at depths (x1 at y = 220, x3 at y=5)
|
||||
tooltip.EMT.draconicSchematic=This Schematic can be found in Pluto Dungeons
|
||||
|
||||
#=============Entity Names=============
|
||||
entity.EMT.laser.name=Laser
|
||||
|
||||
@@ -12,12 +12,12 @@ gui.EMT.inventory=物品栏
|
||||
gui.EMT.book.aspect.output.eu.title=源质发电机
|
||||
gui.EMT.book.aspect.output.essentia.eu=源质发电功率
|
||||
gui.EMT.key.unequip=卸下装备
|
||||
emt.Output=输出:
|
||||
emt.Storage=存储:
|
||||
emt.Output=输出:
|
||||
emt.Storage=存储:
|
||||
emt.PressShift=<按下Shift>
|
||||
emt.Generating=发电:
|
||||
emt.Generating=发电:
|
||||
emt.Fuel=燃料
|
||||
emt.OutputMax=最大输出:
|
||||
emt.OutputMax=最大输出:
|
||||
|
||||
#=============Tooltips=============
|
||||
#This comes after a player name. The 's is depicting ownership.
|
||||
@@ -43,6 +43,7 @@ tooltip.EMT.output.double.nether=处于下界时发电量
|
||||
tooltip.EMT.output.double.lava=每秒供给0.01vis火之要素时发电量
|
||||
tooltip.EMT.output.double.half.height=位置越高发电量越高(y=5时1倍,y=220时3倍)
|
||||
tooltip.EMT.output.double.half.low=位置越低发电量越高(y=220时1倍,y=5时3倍)
|
||||
tooltip.EMT.draconicSchematic=可在冥王星地牢找到相关图纸
|
||||
|
||||
#=============Entity Names=============
|
||||
entity.EMT.laser.name=镭射器
|
||||
@@ -67,6 +68,10 @@ item.EMT.denseIronSheet.name=致密铁片
|
||||
item.EMT.taintedFeather.name=腐化羽毛
|
||||
item.EMT.thaumiumWing.name=神秘增强羽翼
|
||||
item.EMT.uumatterDrop.name=结晶UU物质液滴
|
||||
item.EMT.draconicSchematic.name=龙芯图纸
|
||||
item.EMT.wyvernSchematic.name=双足飞龙核心图纸
|
||||
item.EMT.awakenedSchematic.name=觉醒核心图纸
|
||||
item.EMT.chaoticSchematic.name=混沌核心图纸
|
||||
item.EMT.bauble.euMaker.armor.name=装备充电指环
|
||||
item.EMT.bauble.euMaker.inventory.name=物品充能指环
|
||||
item.EMT.bauble.oneRing.name=魔戒
|
||||
@@ -180,6 +185,12 @@ EMT_GTBLOCK_CASEING.2.name=铱锇魔法框架
|
||||
EMT_GTBLOCK_CASEING.3.name=铟钨魔法框架
|
||||
EMT_GTBLOCK_CASEING.4.name=源质扩散单元半成品
|
||||
EMT_GTBLOCK_CASEING.5.name=魔法机械方块半成品
|
||||
EMT_GTBLOCK_CASEING.7.name=硅岩合金聚合机械方块
|
||||
EMT_GTBLOCK_CASEING.8.name=血腥灵宝聚合机械方块
|
||||
EMT_GTBLOCK_CASEING.9.name=龙锭聚合机械方块
|
||||
EMT_GTBLOCK_CASEING.10.name=双足飞龙聚合机械方块
|
||||
EMT_GTBLOCK_CASEING.11.name=觉醒龙聚合机械方块
|
||||
EMT_GTBLOCK_CASEING.12.name=混沌聚合机械方块
|
||||
|
||||
#=============Thaumonomicon Texts=============
|
||||
emt.rsname.Electric Magic Tools=电力魔法工具
|
||||
@@ -417,4 +428,4 @@ emt.text.Infused Quantum Armor=你已经无事可做,但是你决定做一些有
|
||||
|
||||
emt.rsname.ResearchCompleter=自动化研究
|
||||
emt.tag.ResearchCompleter=再也不用担心秩序危机了
|
||||
emt.text.ResearchCompleter=连连看一开始很有趣,但你已经决定寻找一种更好的方法解决所有的研究.最终,你结合科技与魔法,制造出了一台多方块机器,可以自动完成研究笔记.<BR><BR>需要将灵气节点放在机器内部才能使其正常运行,而且在运行过程中,机器会缓慢摧毁这些节点.节点稳定器不是必须品,但为了让这么多节点不互相打架,我们还是推荐使用节点稳定器.
|
||||
emt.text.ResearchCompleter=连连看一开始很有趣,但你已经决定寻找一种更好的方法解决所有的研究.最终,你结合科技与魔法,制造出了一台多方块机器,可以自动完成研究笔记.<BR><BR>需要将灵气节点放在机器内部才能使其正常运行,而且在运行过程中,机器会缓慢摧毁这些节点.节点稳定器不是必须品,但为了让这么多节点不互相打架,我们还是推荐使用节点稳定器.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
Reference in new issue
Block a user