Compare commits

...
12 Commits
Author SHA1 Message Date
Martin Robertz bf12c01b96 Merge pull request #23 from GTNewHorizons/toolong
Add new lines to multiple people requirement bees.
2022-10-09 15:02:36 +02:00
kuba6000 f28ae4b8e4 Update buildscript 2022-10-09 14:54:38 +02:00
kuba6000 d9f5acd98a Make it pretty 2022-10-09 14:52:07 +02:00
Martin Robertz 4f3c73ee98 Merge pull request #22 from Runakai1/ChaddyMergeBee
Add All Mighty Merge Master
2022-10-09 12:58:08 +02:00
Runakai1 a14ed03d5e Merge branch 'master' into ChaddyMergeBee 2022-10-09 12:57:00 +02:00
Runakai1 a80a7429b1 Add All Mighty Merge Master 2022-10-09 12:56:18 +02:00
Runakai1 8541ba8e53 Merge pull request #21 from Runakai1/ChaddyBaddyBeebee
Add kuba6000 to chad bee
2022-10-09 12:48:20 +02:00
Runakai1 3d65061055 Add kuba6000 to chad bee 2022-10-09 12:41:09 +02:00
Martin Robertz 41d1e97d7c Merge pull request #20 from Kiwi233/master-MC1.7.10
Update zh_CN.lang
2022-09-24 12:41:12 +02:00
[Kiwi233] a811e2b5e4 Update zh_CN.lang 2022-09-24 11:18:30 +08:00
Martin Robertz 4ba17bf8f3 Merge pull request #19 from Runakai1/ChadBeeLang
Updated lang file for chad bee so it finally works
2022-08-15 15:18:54 +02:00
Runakai1 0ae7dcefa3 Updated lang file for chad bee so it finally works 2022-08-15 14:50:12 +02:00
13 changed files with 507 additions and 279 deletions

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
* text eol=lf
*.[jJ][aA][rR] binary
*.[pP][nN][gG] binary
*.[jJ][pP][gG] binary
*.[jJ][pP][eE][gG] binary
*.[gG][iI][fF] binary
*.[tT][iI][fF] binary
*.[tT][iI][fF][fF] binary
*.[iI][cC][oO] binary
*.[sS][vV][gG] text
*.[eE][pP][sS] binary
*.[xX][cC][fF] binary
*.[kK][aA][rR] binary
*.[mM]4[aA] binary
*.[mM][iI][dD] binary
*.[mM][iI][dD][iI] binary
*.[mM][pP]3 binary
*.[oO][gG][gG] binary
*.[rR][aA] binary
*.7[zZ] binary
*.[gG][zZ] binary
*.[tT][aA][rR] binary
*.[tT][gG][zZ] binary
*.[zZ][iI][pP] binary
*.[tT][cC][nN] binary
*.[sS][oO] binary
*.[dD][lL][lL] binary
*.[dD][yY][lL][iI][bB] binary
*.[pP][sS][dD] binary
*.[tT][tT][fF] binary
*.[oO][tT][fF] binary
*.[pP][aA][tT][cC][hH] -text
*.[bB][aA][tT] text eol=crlf
*.[cC][mM][dD] text eol=crlf
*.[pP][sS]1 text eol=crlf
*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary
+308 -145
View File
@@ -1,14 +1,17 @@
//version: 1656760175 //version: 1664372158
/* /*
DO NOT CHANGE THIS FILE! DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Also, you may replace this file at any time if there is an update available. Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/build.gradle for updates.
Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/build.gradle for updates. */
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.matthewprenger.cursegradle.CurseArtifact
import com.matthewprenger.cursegradle.CurseRelation
import com.modrinth.minotaur.dependencies.ModDependency
import com.modrinth.minotaur.dependencies.VersionDependency
import org.gradle.internal.logging.text.StyledTextOutput.Style import org.gradle.internal.logging.text.StyledTextOutput.Style
import org.gradle.internal.logging.text.StyledTextOutputFactory import org.gradle.internal.logging.text.StyledTextOutputFactory
@@ -21,10 +24,17 @@ import java.util.zip.ZipOutputStream
buildscript { buildscript {
repositories { repositories {
mavenCentral()
maven { maven {
name 'forge' name 'forge'
url 'https://maven.minecraftforge.net' url 'https://maven.minecraftforge.net'
} }
maven {
// GTNH ForgeGradle Fork
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
}
maven { maven {
name 'sonatype' name 'sonatype'
url 'https://oss.sonatype.org/content/repositories/snapshots/' url 'https://oss.sonatype.org/content/repositories/snapshots/'
@@ -33,32 +43,39 @@ buildscript {
name 'Scala CI dependencies' name 'Scala CI dependencies'
url 'https://repo1.maven.org/maven2/' url 'https://repo1.maven.org/maven2/'
} }
maven {
name 'jitpack'
url 'https://jitpack.io'
}
} }
dependencies { dependencies {
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.7' classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.9'
} }
} }
plugins { plugins {
id 'java-library' id 'java-library'
id 'idea' id 'idea'
id 'eclipse' id 'eclipse'
id 'scala' id 'scala'
id 'maven-publish' id 'maven-publish'
id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false
id 'org.jetbrains.kotlin.kapt' 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 'com.google.devtools.ksp' version '1.5.30-1.0.0' apply false
id 'org.ajoberstar.grgit' version '4.1.1' id 'org.ajoberstar.grgit' version '4.1.1'
id 'com.github.johnrengelman.shadow' version '4.0.4' id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'com.palantir.git-version' version '0.13.0' apply false id 'com.palantir.git-version' version '0.13.0' apply false
id 'de.undercouch.download' version '5.0.1' id 'de.undercouch.download' version '5.0.1'
id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false
id "com.diffplug.spotless" version "6.7.2" id 'com.diffplug.spotless' version '6.7.2' apply false
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
} }
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'
}
apply plugin: 'com.diffplug.blowdryer'
if (project.file('.git/HEAD').isFile()) { if (project.file('.git/HEAD').isFile()) {
apply plugin: 'com.palantir.git-version' apply plugin: 'com.palantir.git-version'
@@ -84,38 +101,14 @@ idea {
} }
} }
// Spotless autoformatter boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false
// See https://github.com/diffplug/spotless/tree/main/plugin-gradle
// Can be locally toggled via spotless:off/spotless:on comments
spotless {
encoding 'UTF-8'
format 'misc', { if (!disableSpotless) {
target '.gitignore' apply plugin: 'com.diffplug.spotless'
apply from: Blowdryer.file('spotless.gradle')
trimTrailingWhitespace()
indentWithSpaces(4)
endWithNewline()
}
java {
toggleOffOn()
importOrder()
removeUnusedImports()
palantirJavaFormat('1.1.0') // last version supporting jvm 8
}
kotlin {
toggleOffOn()
ktfmt('0.39')
}
groovyGradle {
toggleOffOn()
importOrder()
target '*.gradle'
greclipse('4.19.0') // last version supporting jvm 8
}
} }
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()) throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current())
} }
@@ -140,11 +133,15 @@ checkPropertyExists("containsMixinsAndOrCoreModOnly")
checkPropertyExists("usesShadowedDependencies") checkPropertyExists("usesShadowedDependencies")
checkPropertyExists("developmentEnvironmentUserName") checkPropertyExists("developmentEnvironmentUserName")
boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false propertyDefaultIfUnset("noPublishedSources", false)
boolean usesMixinDebug = project.findProperty('usesMixinDebug') ?: project.usesMixins.toBoolean() propertyDefaultIfUnset("usesMixinDebug", project.usesMixins)
String channel = project.findProperty('channel') ? project.channel : 'stable' propertyDefaultIfUnset("forceEnableMixins", false)
String mappingsVersion = project.findProperty('mappingsVersion') ? project.mappingsVersion : '12' propertyDefaultIfUnset("channel", "stable")
String remoteMappings = project.findProperty('remoteMappings') ? project.remoteMappings : 'https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/' propertyDefaultIfUnset("mappingsVersion", "12")
propertyDefaultIfUnset("modrinthProjectId", "")
propertyDefaultIfUnset("modrinthRelations", "")
propertyDefaultIfUnset("curseForgeProjectId", "")
propertyDefaultIfUnset("curseForgeRelations", "")
String javaSourceDir = "src/main/java/" String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/" String scalaSourceDir = "src/main/scala/"
@@ -153,53 +150,53 @@ String kotlinSourceDir = "src/main/kotlin/"
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/")
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/")
String targetPackageKotlin = kotlinSourceDir + 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) 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("\\.", "/") targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
targetPackageKotlin = kotlinSourceDir + 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) 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 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) throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
} }
} }
if(usesMixins.toBoolean()) { if (usesMixins.toBoolean()) {
if(mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) { if (mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) {
throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!") throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!")
} }
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/") targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/") targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/") targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.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 \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin) 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 targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".scala" String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".scala"
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java" String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
String targetFileKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".kt" 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) 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 targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".scala" String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".scala"
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java" String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
String targetFileKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".kt" 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) throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
} }
} }
@@ -228,9 +225,9 @@ try {
} }
catch (Exception ignored) { catch (Exception ignored) {
out.style(Style.Failure).text( out.style(Style.Failure).text(
'This mod must be version controlled by Git AND the repository must provide at least one tag,\n' + 'This mod must be version controlled by Git AND the repository must provide at least one tag,\n' +
'or the VERSION override must be set! ').style(Style.SuccessHeader).text('(Do NOT download from GitHub using the ZIP option, instead\n' + 'or the VERSION override must be set! ').style(Style.SuccessHeader).text('(Do NOT download from GitHub using the ZIP option, instead\n' +
'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)' 'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)'
) )
versionOverride = 'NO-GIT-TAG-SET' versionOverride = 'NO-GIT-TAG-SET'
identifiedVersion = versionOverride identifiedVersion = versionOverride
@@ -240,30 +237,29 @@ ext {
modVersion = identifiedVersion 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') out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7')
} }
group = modGroup group = modGroup
if(project.hasProperty("customArchiveBaseName") && customArchiveBaseName) { if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
archivesBaseName = customArchiveBaseName archivesBaseName = customArchiveBaseName
} } else {
else {
archivesBaseName = modId archivesBaseName = modId
} }
def arguments = [] def arguments = []
def jvmArguments = [] def jvmArguments = []
if (usesMixins.toBoolean()) { if (usesMixins.toBoolean() || forceEnableMixins) {
arguments += [ arguments += [
"--tweakClass org.spongepowered.asm.launch.MixinTweaker" "--tweakClass org.spongepowered.asm.launch.MixinTweaker"
] ]
if (usesMixinDebug.toBoolean()) { if (usesMixinDebug.toBoolean()) {
jvmArguments += [ jvmArguments += [
"-Dmixin.debug.countInjections=true", "-Dmixin.debug.countInjections=true",
"-Dmixin.debug.verbose=true", "-Dmixin.debug.verbose=true",
"-Dmixin.debug.export=true" "-Dmixin.debug.export=true"
] ]
} }
} }
@@ -274,16 +270,16 @@ minecraft {
if (replaceGradleTokenInFile) { if (replaceGradleTokenInFile) {
replaceIn replaceGradleTokenInFile replaceIn replaceGradleTokenInFile
if(gradleTokenModId) { if (gradleTokenModId) {
replace gradleTokenModId, modId replace gradleTokenModId, modId
} }
if(gradleTokenModName) { if (gradleTokenModName) {
replace gradleTokenModName, modName replace gradleTokenModName, modName
} }
if(gradleTokenVersion) { if (gradleTokenVersion) {
replace gradleTokenVersion, modVersion replace gradleTokenVersion, modVersion
} }
if(gradleTokenGroupName) { if (gradleTokenGroupName) {
replace gradleTokenGroupName, modGroup replace gradleTokenGroupName, modGroup
} }
} }
@@ -292,7 +288,7 @@ minecraft {
args(arguments) args(arguments)
jvmArgs(jvmArguments) jvmArgs(jvmArguments)
if(developmentEnvironmentUserName) { if (developmentEnvironmentUserName) {
args("--username", developmentEnvironmentUserName) args("--username", developmentEnvironmentUserName)
} }
} }
@@ -303,7 +299,7 @@ minecraft {
} }
} }
if(file('addon.gradle').exists()) { if (file('addon.gradle').exists()) {
apply from: 'addon.gradle' apply from: 'addon.gradle'
} }
@@ -320,7 +316,7 @@ repositories {
name 'Overmind forge repo mirror' name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/' url 'https://gregtech.overminddl1.com/'
} }
if(usesMixins.toBoolean()) { if (usesMixins.toBoolean() || forceEnableMixins) {
maven { maven {
name 'sponge' name 'sponge'
url 'https://repo.spongepowered.org/repository/maven-public' url 'https://repo.spongepowered.org/repository/maven-public'
@@ -332,11 +328,13 @@ repositories {
} }
dependencies { dependencies {
if(usesMixins.toBoolean()) { if (usesMixins.toBoolean()) {
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3') annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
annotationProcessor('com.google.guava:guava:24.1.1-jre') annotationProcessor('com.google.guava:guava:24.1.1-jre')
annotationProcessor('com.google.code.gson:gson:2.8.6') annotationProcessor('com.google.code.gson:gson:2.8.6')
annotationProcessor('org.spongepowered:mixin:0.8-SNAPSHOT') annotationProcessor('org.spongepowered:mixin:0.8-SNAPSHOT')
}
if (usesMixins.toBoolean() || forceEnableMixins) {
// using 0.8 to workaround a issue in 0.7 which fails mixin application // using 0.8 to workaround a issue in 0.7 which fails mixin application
compile('com.github.GTNewHorizons:SpongePoweredMixin:0.7.12-GTNH') { compile('com.github.GTNewHorizons:SpongePoweredMixin:0.7.12-GTNH') {
// Mixin includes a lot of dependencies that are too up-to-date // Mixin includes a lot of dependencies that are too up-to-date
@@ -394,7 +392,10 @@ shadowJar {
} }
minimize() // This will only allow shading for actually used classes minimize() // This will only allow shading for actually used classes
configurations = [project.configurations.shadowImplementation, project.configurations.shadowCompile] configurations = [
project.configurations.shadowImplementation,
project.configurations.shadowCompile
]
dependsOn(relocateShadowJar) dependsOn(relocateShadowJar)
} }
@@ -409,38 +410,38 @@ jar {
attributes(getManifestAttributes()) attributes(getManifestAttributes())
} }
if(usesShadowedDependencies.toBoolean()) { if (usesShadowedDependencies.toBoolean()) {
dependsOn(shadowJar) dependsOn(shadowJar)
enabled = false enabled = false
} }
} }
reobf { reobf {
if(usesMixins.toBoolean()) { if (usesMixins.toBoolean()) {
addExtraSrgFile mixinSrg addExtraSrgFile mixinSrg
} }
} }
afterEvaluate { afterEvaluate {
if(usesMixins.toBoolean()) { if (usesMixins.toBoolean()) {
tasks.compileJava { tasks.compileJava {
options.compilerArgs += [ options.compilerArgs += [
"-AreobfSrgFile=${tasks.reobf.srg}", "-AreobfSrgFile=${tasks.reobf.srg}",
"-AoutSrgFile=${mixinSrg}", "-AoutSrgFile=${mixinSrg}",
"-AoutRefMapFile=${refMap}", "-AoutRefMapFile=${refMap}",
// Elan: from what I understand they are just some linter configs so you get some warning on how to properly code // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
"-XDenableSunApiLintControl", "-XDenableSunApiLintControl",
"-XDignore.symbol.file" "-XDignore.symbol.file"
] ]
} }
} }
} }
runClient { runClient {
if(developmentEnvironmentUserName) { if (developmentEnvironmentUserName) {
arguments += [ arguments += [
"--username", "--username",
developmentEnvironmentUserName developmentEnvironmentUserName
] ]
} }
@@ -455,9 +456,9 @@ runServer {
tasks.withType(JavaExec).configureEach { tasks.withType(JavaExec).configureEach {
javaLauncher.set( javaLauncher.set(
javaToolchains.launcherFor { javaToolchains.launcherFor {
languageVersion = projectJavaVersion languageVersion = projectJavaVersion
} }
) )
} }
@@ -465,6 +466,7 @@ processResources {
// this will ensure that this task is redone when the versions change. // this will ensure that this task is redone when the versions change.
inputs.property "version", project.version inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version inputs.property "mcversion", project.minecraft.version
exclude("spotless.gradle")
// replace stuff in mcmod.info, nothing else // replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
@@ -472,48 +474,49 @@ processResources {
// replace modVersion and minecraftVersion // replace modVersion and minecraftVersion
expand "minecraftVersion": project.minecraft.version, expand "minecraftVersion": project.minecraft.version,
"modVersion": modVersion, "modVersion": modVersion,
"modId": modId, "modId": modId,
"modName": modName "modName": modName
} }
if(usesMixins.toBoolean()) { if (usesMixins.toBoolean()) {
from refMap from refMap
} }
// copy everything else that's not the mcmod.info // copy everything else that's not the mcmod.info
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info' exclude 'mcmod.info'
exclude 'spotless.gradle'
} }
} }
def getManifestAttributes() { def getManifestAttributes() {
def manifestAttributes = [:] def manifestAttributes = [:]
if(!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) { if (!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) {
manifestAttributes += ["FMLCorePluginContainsFMLMod": true] manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
} }
if(accessTransformersFile) { if (accessTransformersFile) {
manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] manifestAttributes += ["FMLAT": accessTransformersFile.toString()]
} }
if(coreModClass) { if (coreModClass) {
manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass] manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass]
} }
if(usesMixins.toBoolean()) { if (usesMixins.toBoolean()) {
manifestAttributes += [ manifestAttributes += [
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
"MixinConfigs" : "mixins." + modId + ".json", "MixinConfigs" : "mixins." + modId + ".json",
"ForceLoadAsMod" : !containsMixinsAndOrCoreModOnly.toBoolean() "ForceLoadAsMod": !containsMixinsAndOrCoreModOnly.toBoolean()
] ]
} }
return manifestAttributes return manifestAttributes
} }
task sourcesJar(type: Jar) { task sourcesJar(type: Jar) {
from (sourceSets.main.allSource) from(sourceSets.main.allSource)
from (file("$projectDir/LICENSE")) from(file("$projectDir/LICENSE"))
getArchiveClassifier().set('sources') getArchiveClassifier().set('sources')
} }
@@ -532,7 +535,10 @@ task shadowDevJar(type: ShadowJar) {
} }
minimize() // This will only allow shading for actually used classes minimize() // This will only allow shading for actually used classes
configurations = [project.configurations.shadowImplementation, project.configurations.shadowCompile] configurations = [
project.configurations.shadowImplementation,
project.configurations.shadowCompile
]
} }
task relocateShadowDevJar(type: ConfigureShadowRelocation) { task relocateShadowDevJar(type: ConfigureShadowRelocation) {
@@ -560,22 +566,22 @@ task devJar(type: Jar) {
attributes(getManifestAttributes()) attributes(getManifestAttributes())
} }
if(usesShadowedDependencies.toBoolean()) { if (usesShadowedDependencies.toBoolean()) {
dependsOn(circularResolverJar) dependsOn(circularResolverJar)
enabled = false enabled = false
} }
} }
task apiJar(type: Jar) { task apiJar(type: Jar) {
from (sourceSets.main.allSource) { from(sourceSets.main.allSource) {
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**' include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
} }
from (sourceSets.main.output) { from(sourceSets.main.output) {
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**' include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
} }
from (sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
include("LICENSE") include("LICENSE")
} }
@@ -583,11 +589,11 @@ task apiJar(type: Jar) {
} }
artifacts { artifacts {
if(!noPublishedSources) { if (!noPublishedSources) {
archives sourcesJar archives sourcesJar
} }
archives devJar archives devJar
if(apiPackage) { if (apiPackage) {
archives apiJar archives apiJar
} }
} }
@@ -605,10 +611,10 @@ publishing {
publications { publications {
maven(MavenPublication) { maven(MavenPublication) {
from components.java from components.java
if(usesShadowedDependencies.toBoolean()) { if (usesShadowedDependencies.toBoolean()) {
artifact source: shadowJar, classifier: "" artifact source: shadowJar, classifier: ""
} }
if(!noPublishedSources) { if (!noPublishedSources) {
artifact source: sourcesJar, classifier: "sources" artifact source: sourcesJar, classifier: "sources"
} }
artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev" artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev"
@@ -623,8 +629,11 @@ publishing {
// remove extra garbage from minecraft and minecraftDeps configuration // remove extra garbage from minecraft and minecraftDeps configuration
pom.withXml { pom.withXml {
def badArtifacts = [:].withDefault {[] as Set<String>} def badArtifacts = [:].withDefault { [] as Set<String> }
for (configuration in [projectConfigs.minecraft, projectConfigs.minecraftDeps]) { for (configuration in [
projectConfigs.minecraft,
projectConfigs.minecraftDeps
]) {
for (dependency in configuration.allDependencies) { for (dependency in configuration.allDependencies) {
badArtifacts[dependency.group == null ? "" : dependency.group] += dependency.name badArtifacts[dependency.group == null ? "" : dependency.group] += dependency.name
} }
@@ -653,6 +662,107 @@ publishing {
} }
} }
if (modrinthProjectId.size() != 0) {
apply plugin: 'com.modrinth.minotaur'
File changelogFile = new File("CHANGELOG.md")
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = modrinthProjectId
versionNumber = identifiedVersion
versionType = identifiedVersion.endsWith("-pre") ? "beta" : "release"
changelog = changelogFile.exists() ? changelogFile.getText("UTF-8") : ""
uploadFile = jar
additionalFiles = getSecondaryArtifacts()
gameVersions = [minecraftVersion]
loaders = ["forge"]
debugMode = false
}
if (modrinthRelations.size() != 0) {
String[] deps = modrinthRelations.split(";")
deps.each { dep ->
if (dep.size() == 0) {
return
}
String[] parts = dep.split(":")
String[] qual = parts[0].split("-")
addModrinthDep(qual[0], qual[1], parts[1])
}
}
tasks.modrinth.dependsOn(build)
tasks.publish.dependsOn(tasks.modrinth)
}
if (curseForgeProjectId.size() != 0) {
apply plugin: 'com.matthewprenger.cursegradle'
File changelogFile = new File("CHANGELOG.md")
curseforge {
apiKey = System.getenv("CURSEFORGE_TOKEN")
project {
id = curseForgeProjectId
if (changelogFile.exists()) {
changelogType = "markdown"
changelog = changelogFile
}
releaseType = identifiedVersion.endsWith("-pre") ? "beta" : "release"
addGameVersion minecraftVersion
addGameVersion "Forge"
mainArtifact jar
for (artifact in getSecondaryArtifacts()) addArtifact artifact
}
options {
javaIntegration = false
forgeGradleIntegration = false
debug = false
}
}
if (curseForgeRelations.size() != 0) {
String[] deps = curseForgeRelations.split(";")
deps.each { dep ->
if (dep.size() == 0) {
return
}
String[] parts = dep.split(":")
addCurseForgeRelation(parts[0], parts[1])
}
}
tasks.curseforge.dependsOn(build)
tasks.publish.dependsOn(tasks.curseforge)
}
def addModrinthDep(scope, type, name) {
com.modrinth.minotaur.dependencies.Dependency dep;
if (!(scope in ["required", "optional", "incompatible", "embedded"])) {
throw new Exception("Invalid modrinth dependency scope: " + scope)
}
switch (type) {
case "project":
dep = new ModDependency(name, scope)
break
case "version":
dep = new VersionDependency(name, scope)
break
default:
throw new Exception("Invalid modrinth dependency type: " + type)
}
project.modrinth.dependencies.add(dep)
}
def addCurseForgeRelation(type, name) {
if (!(type in ["requiredDependency", "embeddedLibrary", "optionalDependency", "tool", "incompatible"])) {
throw new Exception("Invalid CurseForge relation type: " + type)
}
CurseArtifact artifact = project.curseforge.curseProjects[0].mainArtifact
CurseRelation rel = (artifact.curseRelations ?: (artifact.curseRelations = new CurseRelation()))
rel."$type"(name)
}
// Updating // Updating
task updateBuildScript { task updateBuildScript {
doLast { doLast {
@@ -662,7 +772,7 @@ task updateBuildScript {
} }
} }
if (isNewBuildScriptVersionAvailable(projectDir.toString())) { if (!project.getGradle().startParameter.isOffline() && isNewBuildScriptVersionAvailable(projectDir.toString())) {
if (autoUpdateBuildScript.toBoolean()) { if (autoUpdateBuildScript.toBoolean()) {
performBuildScriptUpdate(projectDir.toString()) performBuildScriptUpdate(projectDir.toString())
} else { } else {
@@ -671,7 +781,40 @@ if (isNewBuildScriptVersionAvailable(projectDir.toString())) {
} }
static URL availableBuildScriptUrl() { 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/master/settings.gradle.example")
}
static URL exampleGitAttributesUrl() {
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/.gitattributes")
}
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 } }
return true
}
return false
} }
boolean performBuildScriptUpdate(String projectDir) { boolean performBuildScriptUpdate(String projectDir) {
@@ -679,6 +822,10 @@ boolean performBuildScriptUpdate(String projectDir) {
def buildscriptFile = getFile("build.gradle") def buildscriptFile = getFile("build.gradle")
availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } } availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } }
out.style(Style.Success).print("Build script updated. Please REIMPORT the project or RESTART your IDE!") out.style(Style.Success).print("Build script updated. Please REIMPORT the project or RESTART your IDE!")
boolean settingsupdated = verifySettingsGradle()
settingsupdated = verifyGitAttributes() || settingsupdated
if (settingsupdated)
throw new GradleException("Settings has been updated, please re-run task.")
return true return true
} }
return false return false
@@ -698,7 +845,7 @@ boolean isNewBuildScriptVersionAvailable(String projectDir) {
static String getVersionHash(String buildScriptContent) { static String getVersionHash(String buildScriptContent) {
String versionLine = buildScriptContent.find("^//version: [a-z0-9]*") String versionLine = buildScriptContent.find("^//version: [a-z0-9]*")
if(versionLine != null) { if (versionLine != null) {
return versionLine.split(": ").last() return versionLine.split(": ").last()
} }
return "" return ""
@@ -724,16 +871,16 @@ task deobfParams {
overwrite false overwrite false
} }
if(!file(paramsCSV).exists()) { if (!file(paramsCSV).exists()) {
println("Extracting MCP archive ...") println("Extracting MCP archive ...")
unzip(mcpZIP, mcpDir) unzip(mcpZIP, mcpDir)
} }
println("Parsing params.csv ...") println("Parsing params.csv ...")
Map<String, String> params = new HashMap<>() Map<String, String> params = new HashMap<>()
Files.lines(Paths.get(paramsCSV)).forEach{line -> Files.lines(Paths.get(paramsCSV)).forEach { line ->
String[] cells = line.split(",") 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]) params.put(cells[0], cells[1])
} }
} }
@@ -746,8 +893,8 @@ task deobfParams {
static int replaceParams(File file, Map<String, String> params) { static int replaceParams(File file, Map<String, String> params) {
int fileCount = 0 int fileCount = 0
if(file.isDirectory()) { if (file.isDirectory()) {
for(File f : file.listFiles()) { for (File f : file.listFiles()) {
fileCount += replaceParams(f, params) fileCount += replaceParams(f, params)
} }
return fileCount return fileCount
@@ -756,14 +903,14 @@ static int replaceParams(File file, Map<String, String> params) {
try { try {
String content = new String(Files.readAllBytes(file.toPath())) String content = new String(Files.readAllBytes(file.toPath()))
int hash = content.hashCode() int hash = content.hashCode()
params.forEach{key, value -> params.forEach { key, value ->
content = content.replaceAll(key, value) content = content.replaceAll(key, value)
} }
if(hash != content.hashCode()) { if (hash != content.hashCode()) {
Files.write(file.toPath(), content.getBytes("UTF-8")) Files.write(file.toPath(), content.getBytes("UTF-8"))
return 1 return 1
} }
} catch(Exception e) { } catch (Exception e) {
e.printStackTrace() e.printStackTrace()
} }
return 0 return 0
@@ -814,16 +961,16 @@ def deobf(String sourceURL) {
//get rid of directories: //get rid of directories:
int lastSlash = fileName.lastIndexOf("/") int lastSlash = fileName.lastIndexOf("/")
if(lastSlash > 0) { if (lastSlash > 0) {
fileName = fileName.substring(lastSlash + 1) fileName = fileName.substring(lastSlash + 1)
} }
//get rid of extension: //get rid of extension:
if(fileName.endsWith(".jar") || fileName.endsWith(".litemod")) { if (fileName.endsWith(".jar") || fileName.endsWith(".litemod")) {
fileName = fileName.substring(0, fileName.lastIndexOf(".")) fileName = fileName.substring(0, fileName.lastIndexOf("."))
} }
String hostName = url.getHost() String hostName = url.getHost()
if(hostName.startsWith("www.")) { if (hostName.startsWith("www.")) {
hostName = hostName.substring(4) hostName = hostName.substring(4)
} }
List parts = Arrays.asList(hostName.split("\\.")) List parts = Arrays.asList(hostName.split("\\."))
@@ -831,7 +978,7 @@ def deobf(String sourceURL) {
hostName = String.join(".", parts) hostName = String.join(".", parts)
return deobf(sourceURL, "$hostName/$fileName") return deobf(sourceURL, "$hostName/$fileName")
} catch(Exception e) { } catch (Exception e) {
return deobf(sourceURL, "deobf/${sourceURL.hashCode()}") return deobf(sourceURL, "deobf/${sourceURL.hashCode()}")
} }
} }
@@ -846,12 +993,13 @@ def deobf(String sourceURL, String rawFileName) {
String obfFile = "$cacheDir/modules-2/files-2.1/${fileName}.jar" String obfFile = "$cacheDir/modules-2/files-2.1/${fileName}.jar"
String deobfFile = "$cacheDir/modules-2/files-2.1/${fileName}-deobf.jar" String deobfFile = "$cacheDir/modules-2/files-2.1/${fileName}-deobf.jar"
if(file(deobfFile).exists()) { if (file(deobfFile).exists()) {
return files(deobfFile) return files(deobfFile)
} }
String mappingsVer String mappingsVer
if(remoteMappings) { 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 id = "${forgeVersion.split("\\.")[3]}-$minecraftVersion"
String mappingsZIP = "$cacheDir/forge_gradle/maven_downloader/de/oceanlabs/mcp/mcp_snapshot_nodoc/$id/mcp_snapshot_nodoc-${id}.zip" String mappingsZIP = "$cacheDir/forge_gradle/maven_downloader/de/oceanlabs/mcp/mcp_snapshot_nodoc/$id/mcp_snapshot_nodoc-${id}.zip"
@@ -887,7 +1035,7 @@ def deobf(String sourceURL, String rawFileName) {
def zipMappings(String zipPath, String url, String bon2Dir) { def zipMappings(String zipPath, String url, String bon2Dir) {
File zipFile = new File(zipPath) File zipFile = new File(zipPath)
if(zipFile.exists()) { if (zipFile.exists()) {
return return
} }
@@ -927,6 +1075,21 @@ def checkPropertyExists(String propertyName) {
} }
} }
def propertyDefaultIfUnset(String propertyName, defaultValue) {
if (!project.hasProperty(propertyName) || project.property(propertyName) == "") {
project.ext.setProperty(propertyName, defaultValue)
}
}
def getFile(String relativePath) { def getFile(String relativePath) {
return new File(projectDir, relativePath) return new File(projectDir, relativePath)
} }
def getSecondaryArtifacts() {
// Because noPublishedSources from the beginning of the script is somehow not visible here...
boolean noPublishedSources = project.hasProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false
def secondaryArtifacts = [devJar]
if (!noPublishedSources) secondaryArtifacts += [sourcesJar]
if (apiPackage) secondaryArtifacts += [apiJar]
return secondaryArtifacts
}
+10
View File
@@ -0,0 +1,10 @@
plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
}
apply plugin: 'com.diffplug.blowdryerSetup'
blowdryerSetup {
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.1.5')
//devLocal '.' // Use this when testing config updates locally
}
@@ -2,6 +2,7 @@ package binnie.extrabees.genetics;
import binnie.core.Mods; import binnie.core.Mods;
import binnie.extrabees.genetics.effect.ExtraBeesEffect; import binnie.extrabees.genetics.effect.ExtraBeesEffect;
import binnie.extrabees.genetics.requirements.RequirementPerson;
import binnie.extrabees.products.EnumHoneyComb; import binnie.extrabees.products.EnumHoneyComb;
import binnie.extrabees.products.ItemHoneyComb; import binnie.extrabees.products.ItemHoneyComb;
import binnie.genetics.genetics.AlleleHelper; import binnie.genetics.genetics.AlleleHelper;
@@ -29,6 +30,7 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary;
public enum ExtraBeeDefinition implements IBeeDefinition { public enum ExtraBeeDefinition implements IBeeDefinition {
@@ -1639,12 +1641,10 @@ public enum ExtraBeeDefinition implements IBeeDefinition {
} }
}, },
CHAD(ExtraBeeBranchDefinition.FTB, "merciboocoup", true, new Color(0x2157DB), new Color(0xD2ABD1)) { CHAD(ExtraBeeBranchDefinition.FTB, "merciboocoup", true, new Color(0x2157DB), new Color(0xD2ABD1)) {
ItemStack product = new ItemStack(Items.cake, 1);
@Override @Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) { protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies beeSpecies
.addProduct(product, 1f) .addProduct(new ItemStack(Items.cake, 1), 1f)
.addSpecialty(Mods.forestry.stack("pollenFertile"), 0.50f) .addSpecialty(Mods.forestry.stack("pollenFertile"), 0.50f)
.addSpecialty(EnumHoneyComb.MILK.get(1), 0.55f) .addSpecialty(EnumHoneyComb.MILK.get(1), 0.55f)
.setIsNotCounted() .setIsNotCounted()
@@ -1661,18 +1661,36 @@ public enum ExtraBeeDefinition implements IBeeDefinition {
@Override @Override
protected void registerMutations() { protected void registerMutations() {
String[] names = { registerMutation(BeeDefinition.CULTIVATED, CELEBRATORY, 5)
"Runakai", .restrictPerson(new RequirementPerson()
"boubou_19", .add(
"Alastors_Game", name -> ""
"BlueWeabo", + EnumChatFormatting.DARK_RED
"Lewis_Saber", + EnumChatFormatting.BOLD + "R"
"True_Aurastorm", + EnumChatFormatting.RED
"minecraft7771", + EnumChatFormatting.BOLD + "u"
"mitchej123", + EnumChatFormatting.GOLD
"_Timbo" + EnumChatFormatting.BOLD + "n"
}; + EnumChatFormatting.YELLOW
registerMutation(BeeDefinition.CULTIVATED, CELEBRATORY, 5).restrictedByGroupOfPersons(names); + EnumChatFormatting.BOLD + "a"
+ EnumChatFormatting.DARK_GREEN
+ EnumChatFormatting.BOLD + "k"
+ EnumChatFormatting.GREEN
+ EnumChatFormatting.BOLD + "a"
+ EnumChatFormatting.AQUA
+ EnumChatFormatting.BOLD + "i",
"Runakai")
.add(
"boubou_19",
"Alastors_Game",
"BlueWeabo",
"Lewis_Saber",
"True_Aurastorm",
"minecraft7771",
"mitchej123",
"_Timbo",
"kuba6000",
"DreamMasterXXL"));
} }
}, },
@@ -11,6 +11,7 @@ import forestry.api.genetics.IAllele;
import forestry.api.genetics.IMutation; import forestry.api.genetics.IMutation;
import forestry.apiculture.genetics.BeeMutation; import forestry.apiculture.genetics.BeeMutation;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
public class ExtraBeeMutation extends BeeMutation implements IBeeMutationCustom { public class ExtraBeeMutation extends BeeMutation implements IBeeMutationCustom {
@@ -44,15 +45,19 @@ public class ExtraBeeMutation extends BeeMutation implements IBeeMutationCustom
return super.getChance(housing, allele0, allele1, genome0, genome1); return super.getChance(housing, allele0, allele1, genome0, genome1);
} }
public void restrictPerson(String nickname) { public void restrictPerson(String... nicknames) {
RequirementPerson requirement = new RequirementPerson(nickname); restrictPerson(new RequirementPerson(nicknames));
requirements.add(requirement);
addMutationCondition(new DummyMutationCondition(requirement));
} }
public void restrictedByGroupOfPersons(String[] nicknames) { public void restrictPerson(RequirementPerson requirement) {
RequirementGroupOfPersons requirement = new RequirementGroupOfPersons(nicknames);
requirements.add(requirement); requirements.add(requirement);
addMutationCondition(new DummyMutationConditionGroupPersons(requirement)); addMutationCondition(new DummyMutationCondition(requirement));
ArrayList<String> descriptions = (ArrayList<String>) getSpecialConditions();
int i = descriptions.size() - 1;
String description = descriptions.get(i);
if (description.contains("/n")) {
descriptions.remove(i);
descriptions.addAll(Arrays.asList(description.split("/n")));
}
} }
} }
@@ -1,34 +0,0 @@
package binnie.extrabees.genetics.requirements;
import forestry.api.core.IClimateProvider;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutationCondition;
import net.minecraft.world.World;
public class DummyMutationConditionGroupPersons implements IMutationCondition {
private final RequirementGroupOfPersons requirement;
public DummyMutationConditionGroupPersons(RequirementGroupOfPersons requirement) {
this.requirement = requirement;
}
@Override
public float getChance(
World world,
int x,
int y,
int z,
IAllele allele0,
IAllele allele1,
IGenome genome0,
IGenome genome1,
IClimateProvider climate) {
return 1.0F;
}
@Override
public String getDescription() {
return requirement.getDescription();
}
}
@@ -1,27 +0,0 @@
package binnie.extrabees.genetics.requirements;
import binnie.core.util.I18N;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IGenome;
import java.util.Arrays;
import java.util.List;
public class RequirementGroupOfPersons implements IMutationRequirement {
protected List<String> names;
public RequirementGroupOfPersons(String[] name) {
this.names = Arrays.asList(name);
}
@Override
public String getDescription() {
return I18N.localise("extrabees.genetics.requirements.user", names);
}
@Override
public boolean fufilled(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
String ownerName = housing.getOwner().getName();
return ownerName != null && names.contains(ownerName); // ownerName.contains(name);
}
}
@@ -4,22 +4,58 @@ import binnie.core.util.I18N;
import forestry.api.apiculture.IBeeHousing; import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IAllele; import forestry.api.genetics.IAllele;
import forestry.api.genetics.IGenome; import forestry.api.genetics.IGenome;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import net.minecraft.util.EnumChatFormatting;
public class RequirementPerson implements IMutationRequirement { public class RequirementPerson implements IMutationRequirement {
protected String name; protected List<String> names;
protected HashMap<String, Function<String, String>> nameFormatters = new HashMap<>();
private static final Function<String, String> defaultApplier = name -> name;
private static final String REQUIREMENT_USER_LOCALIZE_KEY = "extrabees.genetics.requirements.user";
public RequirementPerson(String name) { public RequirementPerson(String... names) {
this.name = name; this.names = Arrays.stream(names).collect(Collectors.toList());
}
public RequirementPerson add(String... names) {
this.names.addAll(Arrays.asList(names));
return this;
}
public RequirementPerson add(Function<String, String> formatter, String... names) {
this.names.addAll(Arrays.asList(names));
for (String name : names) nameFormatters.put(name, formatter);
return this;
} }
@Override @Override
public String getDescription() { public String getDescription() {
return I18N.localise("extrabees.genetics.requirements.user", name); if (names.isEmpty()) return I18N.localise(REQUIREMENT_USER_LOCALIZE_KEY, "No one");
final StringBuilder namesFormatted = new StringBuilder("[");
boolean hasNewLines = false;
for (int i = 0, isize = names.size(); i < isize; i++) {
if (i != 0) {
namesFormatted.append(", ");
if (i % 3 == 0) namesFormatted.append("/n ");
hasNewLines = true;
}
String name = names.get(i);
namesFormatted.append(
nameFormatters.getOrDefault(name, defaultApplier).apply(name));
namesFormatted.append(EnumChatFormatting.RESET);
}
namesFormatted.append("]");
if (hasNewLines) namesFormatted.insert(0, "/n");
return I18N.localise(REQUIREMENT_USER_LOCALIZE_KEY, namesFormatted.toString());
} }
@Override @Override
public boolean fufilled(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) { public boolean fufilled(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
String ownerName = housing.getOwner().getName(); String ownerName = housing.getOwner().getName();
return ownerName != null && ownerName.equals(name); return ownerName != null && names.contains(ownerName);
} }
} }
@@ -439,8 +439,8 @@ extrabees.species.lightgray.name=Ashen
extrabees.species.celebratory.name=Celebratory extrabees.species.celebratory.name=Celebratory
extrabees.species.jaded.name=Jaded extrabees.species.jaded.name=Jaded
extrabees.species.jaded.desc=I bred all the bees and all I got is some bloody purple dye!|Jaded, Sengir's Chosen extrabees.species.jaded.desc=I bred all the bees and all I got is some bloody purple dye!|Jaded, Sengir's Chosen
extrabees.species.chads.name=Chad extrabees.species.chad.name=Chad
extrabees.species.chads.desc=GTNH Bienen: Das Beste Was Es Gibt. extrabees.species.chad.desc=GTNH Bienen: Das Beste Was Es Gibt.
extrabees.species.glowstone.name=Glowering extrabees.species.glowstone.name=Glowering
extrabees.species.hazardous.name=Hazardous extrabees.species.hazardous.name=Hazardous
extrabees.species.nickel.name=Lustered extrabees.species.nickel.name=Lustered
@@ -580,8 +580,8 @@ extrabees.species.celebratory.name=Праздничная
# Мерзкая ветвь # Мерзкая ветвь
extrabees.species.jaded.name=Изнурённая extrabees.species.jaded.name=Изнурённая
extrabees.species.jaded.desc=Я разводил этих пчёл и всё, что я получил - это кроваво-фиолетовый краситель!|Jaded, Sengir's Chosen extrabees.species.jaded.desc=Я разводил этих пчёл и всё, что я получил - это кроваво-фиолетовый краситель!|Jaded, Sengir's Chosen
extrabees.species.chads.name=конфетти extrabees.species.chad.name=конфетти
extrabees.species.chads.desc=GTNH Bienen: Das Beste Was Es Gibt. extrabees.species.chad.desc=GTNH Bienen: Das Beste Was Es Gibt.
# Суровая ветвь # Суровая ветвь
extrabees.species.hazardous.name=Опасная extrabees.species.hazardous.name=Опасная
@@ -64,7 +64,7 @@ extrabees.item.comb.limegreen=染色蜂窝(黄绿)
extrabees.item.comb.magenta=染色蜂窝(品红) extrabees.item.comb.magenta=染色蜂窝(品红)
extrabees.item.comb.lightgray=染色蜂窝(淡灰) extrabees.item.comb.lightgray=染色蜂窝(淡灰)
extrabees.item.comb.nickel=镍蜂窝 extrabees.item.comb.nickel=镍蜂窝
extrabees.item.comb.glowstone=荧石蜂窝 extrabees.item.comb.glowstone=萤石蜂窝
extrabees.item.comb.saltpeter=硝石蜂窝 extrabees.item.comb.saltpeter=硝石蜂窝
extrabees.item.comb.compost=堆肥蜂窝 extrabees.item.comb.compost=堆肥蜂窝
extrabees.item.comb.sawdust=木屑蜂窝 extrabees.item.comb.sawdust=木屑蜂窝
@@ -127,7 +127,7 @@ extrabees.item.template.corrupted=脏的模版
extrabees.item.template.name=%s 模版 extrabees.item.template.name=%s 模版
extrabees.item.template.empty=空白模版 extrabees.item.template.empty=空白模版
extrabees.item.database=养蜂人数据库 extrabees.item.database=养蜂员数据库
extrabees.item.masterDatabase=养蜂大师数据库 extrabees.item.masterDatabase=养蜂大师数据库
extrabees.item.database.tooltip=风光尽在盒中 extrabees.item.database.tooltip=风光尽在盒中
@@ -162,7 +162,7 @@ extrabees.item.yelloriumDust=黄铀砂
extrabees.item.blutoniumDust=蓝钚砂 extrabees.item.blutoniumDust=蓝钚砂
extrabees.item.cyaniteDust=蓝晶砂 extrabees.item.cyaniteDust=蓝晶砂
extrabees.block.apiaristMachine.name=养蜂人机器方块 extrabees.block.apiaristMachine.name=养蜂员机器方块
extrabees.block.geneticMachine.name=基因机器方块 extrabees.block.geneticMachine.name=基因机器方块
extrabees.block.advGeneticMachine.name=高级基因机器方块 extrabees.block.advGeneticMachine.name=高级基因机器方块
extrabees.block.ectoplasm.name=胶质网 extrabees.block.ectoplasm.name=胶质网
@@ -299,33 +299,33 @@ extrabees.flowers.fruit.name=水果
extrabees.flowers.mystical.name=神秘 extrabees.flowers.mystical.name=神秘
extrabees.species.arid.name=干旱 extrabees.species.arid.name=干旱
extrabees.species.arid.desc=它们喜欢干旱的大陆,它们的蜂窝几乎都由蜡组成,少有蜂蜜。|养蜂人手册 extrabees.species.arid.desc=它们喜欢干旱的大陆,它们的蜂窝几乎都由蜡组成,少有蜂蜜。|养蜂员手册
extrabees.species.barren.name=荒芜 extrabees.species.barren.name=荒芜
extrabees.species.barren.desc=这种对沙漠的偏爱,使得它们可以生活在完全没有花的世界。|养蜂人手册 extrabees.species.barren.desc=这种对沙漠的偏爱,使得它们可以生活在完全没有花的世界。|养蜂员手册
extrabees.species.desolate.name=荒凉 extrabees.species.desolate.name=荒凉
extrabees.species.desolate.desc=被诅咒的荒芜之地对于别的生物来说是地狱,是万物的凋零,而这种蜜蜂却能在这种环境里生生不息。|养蜂人手册 extrabees.species.desolate.desc=被诅咒的荒芜之地对于别的生物来说是地狱,是万物的凋零,而这种蜜蜂却能在这种环境里生生不息。|养蜂员手册
extrabees.species.gnawing.name=痛苦 extrabees.species.gnawing.name=痛苦
extrabees.species.rotten.name=腐烂 extrabees.species.rotten.name=腐烂
extrabees.species.rotten.desc=这些蜜蜂对死去的动物的腐肉有种不寻常的兴趣,它们甚至会在蜂巢里储存腐肉。它们的气味也会吸引一些比较难闻的生物(僵尸)。|养蜂人手册 extrabees.species.rotten.desc=这些蜜蜂对死去的动物的腐肉有种不寻常的兴趣,它们甚至会在蜂巢里储存腐肉。它们的气味也会吸引一些比较难闻的生物(僵尸)。|养蜂员手册
extrabees.species.bone.name=骷髅 extrabees.species.bone.name=骷髅
extrabees.species.bone.desc=因为在野外它们很难保卫它们的家,所以它们吸引了其他的生物(骷髅)来保卫它们的蜂房。|养蜂人手册 extrabees.species.bone.desc=因为在野外它们很难保卫它们的家,所以它们吸引了其他的生物(骷髅)来保卫它们的蜂房。|养蜂员手册
extrabees.species.creeper.name=爬行者 extrabees.species.creeper.name=爬行者
extrabees.species.creeper.desc=你不是很确定你会不会听到它们发出爆炸声。|Binnie,养蜂人 extrabees.species.creeper.desc=你不是很确定你会不会听到它们发出爆炸声。|Binnie,养蜂员
extrabees.species.decomposing.name=分解 extrabees.species.decomposing.name=分解
extrabees.species.rock.name=石头 extrabees.species.rock.name=石头
extrabees.species.rock.desc=如果只有我能发现这些旋转的蜜蜂的话,我或许会听到一些美妙的音乐(摇滚乐)。|神秘的养蜂人 extrabees.species.rock.desc=如果只有我能发现这些旋转的蜜蜂的话,我或许会听到一些美妙的音乐(摇滚乐)。|神秘的养蜂员
extrabees.species.stone.name=忍耐 extrabees.species.stone.name=忍耐
extrabees.species.stone.desc=它们的蜂巢一部分以石头打造,并且消耗的蜡也比以往少。|养蜂人手册 extrabees.species.stone.desc=它们的蜂巢一部分以石头打造,并且消耗的蜡也比以往少。|养蜂员手册
extrabees.species.granite.name=坚毅 extrabees.species.granite.name=坚毅
extrabees.species.granite.desc=获得了于岩石中打洞的能力后,它们和隐藏于石头之中的矿物质有了令人惊异的密切关系。|养蜂人手册 extrabees.species.granite.desc=获得了于岩石中打洞的能力后,它们和隐藏于石头之中的矿物质有了令人惊异的密切关系。|养蜂员手册
extrabees.species.mineral.name=弹性 extrabees.species.mineral.name=弹性
extrabees.species.mineral.desc=起源于岩缝中的蜜蜂,它们的后代已经开始进化出以矿物质作为食粮的基因。|养蜂人手册 extrabees.species.mineral.desc=起源于岩缝中的蜜蜂,它们的后代已经开始进化出以矿物质作为食粮的基因。|养蜂员手册
extrabees.species.copper.name=铜绿 extrabees.species.copper.name=铜绿
extrabees.species.copper.desc=它们因啃咬墙壁中的铜线缆造成的供电问题而声名狼藉。|养蜂人手册 extrabees.species.copper.desc=它们因啃咬墙壁中的铜线缆造成的供电问题而声名狼藉。|养蜂员手册
extrabees.species.tin.name=锡灰 extrabees.species.tin.name=锡灰
extrabees.species.tin.desc=它们的身体被金属所覆盖,它们还用这种金属打造它们的蜂巢。|养蜂人手册 extrabees.species.tin.desc=它们的身体被金属所覆盖,它们还用这种金属打造它们的蜂巢。|养蜂员手册
extrabees.species.iron.name=铁锈 extrabees.species.iron.name=铁锈
extrabees.species.iron.desc=哦,锈掉的蜜蜂诶。我是不是要去打针破伤风疫苗?|Jadedcat,养蜂人 extrabees.species.iron.desc=哦,锈掉的蜜蜂诶。我是不是要去打针破伤风疫苗?|Jadedcat,养蜂员
extrabees.species.lead.name=铅质 extrabees.species.lead.name=铅质
extrabees.species.lead.desc=“用它应该很容易实现炼金术!”|Pahimar,炼金术士 extrabees.species.lead.desc=“用它应该很容易实现炼金术!”|Pahimar,炼金术士
extrabees.species.zinc.name=镀锌 extrabees.species.zinc.name=镀锌
@@ -338,7 +338,7 @@ extrabees.species.gold.name=金闪
extrabees.species.silver.name=银辉 extrabees.species.silver.name=银辉
extrabees.species.electrum.name=琥珀金 extrabees.species.electrum.name=琥珀金
extrabees.species.platinum.name=铂金 extrabees.species.platinum.name=铂金
extrabees.species.platinum.desc=喔喔,看这个闪光的蜜蜂。|Jadedcat,养蜂人 extrabees.species.platinum.desc=喔喔,看这个闪光的蜜蜂。|Jadedcat,养蜂员
extrabees.species.lapis.name=青金石 extrabees.species.lapis.name=青金石
extrabees.species.sodalite.name=方钠 extrabees.species.sodalite.name=方钠
extrabees.species.pyrite.name=黄铁 extrabees.species.pyrite.name=黄铁
@@ -346,12 +346,12 @@ extrabees.species.bauxite.name=铝土
extrabees.species.cinnabar.name=朱砂 extrabees.species.cinnabar.name=朱砂
extrabees.species.sphalerite.name=闪锌 extrabees.species.sphalerite.name=闪锌
extrabees.species.emerald.name=绿宝石 extrabees.species.emerald.name=绿宝石
extrabees.species.emerald.desc=看这个蜜蜂!它甚至亮瞎了我的眼睛!|Jadedcat,养蜂人 extrabees.species.emerald.desc=看这个蜜蜂!它甚至亮瞎了我的眼睛!|Jadedcat,养蜂员
extrabees.species.ruby.name=红宝石 extrabees.species.ruby.name=红宝石
extrabees.species.sapphire.name=蓝宝石 extrabees.species.sapphire.name=蓝宝石
extrabees.species.olivine.name=橄榄石 extrabees.species.olivine.name=橄榄石
extrabees.species.diamond.name=钻石 extrabees.species.diamond.name=钻石
extrabees.species.diamond.desc=我的天,这绝对是我见过的最闪亮的蜜蜂!|Jadedcat,养蜂人 extrabees.species.diamond.desc=我的天,这绝对是我见过的最闪亮的蜜蜂!|Jadedcat,养蜂员
extrabees.species.unstable.name=不稳 extrabees.species.unstable.name=不稳
extrabees.species.nuclear.name=核能 extrabees.species.nuclear.name=核能
extrabees.species.radioactive.name=辐射 extrabees.species.radioactive.name=辐射
@@ -379,7 +379,7 @@ extrabees.species.sugar.name=含糖
extrabees.species.ripening.name=成熟 extrabees.species.ripening.name=成熟
extrabees.species.fruit.name=水果 extrabees.species.fruit.name=水果
extrabees.species.alcohol.name=发酵 extrabees.species.alcohol.name=发酵
extrabees.species.alcohol.desc=回家吧蜜蜂们,你们早喝多了。|Jadedcat, 养蜂人 extrabees.species.alcohol.desc=回家吧蜜蜂们,你们早喝多了。|Jadedcat, 养蜂员
extrabees.species.farm.name=农庄 extrabees.species.farm.name=农庄
extrabees.species.milk.name=牛奶 extrabees.species.milk.name=牛奶
extrabees.species.milk.desc=“哞哞。嗯…… 我是说,Bzzz。”|一只困惑的蜜蜂 extrabees.species.milk.desc=“哞哞。嗯…… 我是说,Bzzz。”|一只困惑的蜜蜂
@@ -391,11 +391,11 @@ extrabees.species.swamp.name=潮湿
extrabees.species.boggy.name=泥淖 extrabees.species.boggy.name=泥淖
extrabees.species.fungal.name=菌类 extrabees.species.fungal.name=菌类
extrabees.species.basalt.name=激怒 extrabees.species.basalt.name=激怒
extrabees.species.basalt.desc=它们的祖先到达下界的方式仍不得而知,但下界早已使得它们变得富有攻击性。|养蜂人手册 extrabees.species.basalt.desc=它们的祖先到达下界的方式仍不得而知,但下界早已使得它们变得富有攻击性。|养蜂员手册
extrabees.species.tempered.name=愤怒 extrabees.species.tempered.name=愤怒
extrabees.species.tempered.desc=一次不寻常的突变激活了这只蜜蜂身上更高级别的愤怒的隐性基因。|养蜂人手册 extrabees.species.tempered.desc=一次不寻常的突变激活了这只蜜蜂身上更高级别的愤怒的隐性基因。|养蜂员手册
extrabees.species.volcanic.name=火山 extrabees.species.volcanic.name=火山
extrabees.species.volcanic.desc=在进化的历程中,它们似乎在什么地方获得了烈焰人的特征。|养蜂人手册 extrabees.species.volcanic.desc=在进化的历程中,它们似乎在什么地方获得了烈焰人的特征。|养蜂员手册
extrabees.species.malicious.name=恶意 extrabees.species.malicious.name=恶意
extrabees.species.infectious.name=传染 extrabees.species.infectious.name=传染
extrabees.species.virulent.name=剧毒 extrabees.species.virulent.name=剧毒
@@ -406,24 +406,24 @@ extrabees.species.corrosive.name=腐蚀
extrabees.species.caustic.name=苛性 extrabees.species.caustic.name=苛性
extrabees.species.acidic.name=酸化 extrabees.species.acidic.name=酸化
extrabees.species.excited.name=激动 extrabees.species.excited.name=激动
extrabees.species.excited.desc=红石,作为它们额外的能量源,而存在。|养蜂人手册 extrabees.species.excited.desc=红石,作为它们额外的能量源,而存在。|养蜂员手册
extrabees.species.energetic.name=活力十足 extrabees.species.energetic.name=活力十足
extrabees.species.energetic.desc=我的天,搞什么鬼!房子失火了!房子失火了!|Generikb,恐慌的养蜂人 extrabees.species.energetic.desc=我的天,搞什么鬼!房子失火了!房子失火了!|Generikb,恐慌的养蜂员
extrabees.species.ecstatic.name=狂喜 extrabees.species.ecstatic.name=狂喜
extrabees.species.ecstatic.desc=在从红石里汲取了过量的电力后,它们可以产生充满了能量的电弧。请务必做好防范措施,或许一根避雷针就好。|养蜂人手册 extrabees.species.ecstatic.desc=在从红石里汲取了过量的电力后,它们可以产生充满了能量的电弧。请务必做好防范措施,或许一根避雷针就好。|养蜂员手册
extrabees.species.artic.name=冻结 extrabees.species.artic.name=冻结
extrabees.species.freezing.name=冰封 extrabees.species.freezing.name=冰封
extrabees.species.shadow.name=阴影 extrabees.species.shadow.name=阴影
extrabees.species.darkened.name=黑暗 extrabees.species.darkened.name=黑暗
extrabees.species.abyss.name=深渊 extrabees.species.abyss.name=深渊
extrabees.species.red.name=红色 extrabees.species.red.name=红色
extrabees.species.red.desc=不要被它们蜇了,否则你眼前将尽是红色的世界。|养蜂人手册 extrabees.species.red.desc=不要被它们蜇了,否则你眼前将尽是红色的世界。|养蜂员手册
extrabees.species.yellow.name=黄色 extrabees.species.yellow.name=黄色
extrabees.species.yellow.desc=它们正尝试用蜂蜜来染出你闪光的新一天。|养蜂人手册 extrabees.species.yellow.desc=它们正尝试用蜂蜜来染出你闪光的新一天。|养蜂员手册
extrabees.species.blue.name=蓝色 extrabees.species.blue.name=蓝色
extrabees.species.blue.desc=“加油吧我的蜜蜂。你看上去开始有点泛蓝了。”|神秘的养蜂人 extrabees.species.blue.desc=“加油吧我的蜜蜂。你看上去开始有点泛蓝了。”|神秘的养蜂员
extrabees.species.green.name=绿色 extrabees.species.green.name=绿色
extrabees.species.green.desc=或许这是一种对于保护色的尝试,然而这些蜜蜂已经开始生产颜色接近树叶或草的颜色的蜂巢了。|养蜂人手册 extrabees.species.green.desc=或许这是一种对于保护色的尝试,然而这些蜜蜂已经开始生产颜色接近树叶或草的颜色的蜂巢了。|养蜂员手册
extrabees.species.black.name=黑色 extrabees.species.black.name=黑色
extrabees.species.white.name=白色 extrabees.species.white.name=白色
extrabees.species.brown.name=棕色 extrabees.species.brown.name=棕色
@@ -439,8 +439,8 @@ extrabees.species.lightgray.name=淡灰
extrabees.species.celebratory.name=普天同庆 extrabees.species.celebratory.name=普天同庆
extrabees.species.jaded.name=翡翠 extrabees.species.jaded.name=翡翠
extrabees.species.jaded.desc=我培养出了所有蜜蜂,最后却只得到了点带血色的紫色染料!|Jaded,被 Sengir 选中之人 extrabees.species.jaded.desc=我培养出了所有蜜蜂,最后却只得到了点带血色的紫色染料!|Jaded,被 Sengir 选中之人
extrabees.species.chads.name=乍得 extrabees.species.chad.name=纸屑
extrabees.species.chads.desc=GTNH Bienen: Das Beste Was Es Gibt. extrabees.species.chad.desc=GTNH蜜蜂:最好的东西.
extrabees.species.glowstone.name=怒视 extrabees.species.glowstone.name=怒视
extrabees.species.hazardous.name=冒险 extrabees.species.hazardous.name=冒险
extrabees.species.nickel.name=含镍 extrabees.species.nickel.name=含镍
@@ -158,12 +158,12 @@ extratrees.block.tooltip.twoMaterials=%s - %s
< %1$s is name of wood used for door > < %1$s is name of wood used for door >
extratrees.block.door.name=%1$s木门 extratrees.block.door.name=%1$s木门
< %1$s is name of wood used for door, %2$s is type of door > < %1$s is name of wood used for door, %2$s is type of door >
extratrees.block.door.name.adv=%1$s%2$s木门 extratrees.block.door.name.adv=%1$s%2$s木门
extratrees.block.door.type.standard= extratrees.block.door.type.standard=
extratrees.block.door.type.solid=Solid extratrees.block.door.type.solid=坚固
extratrees.block.door.type.double=Split extratrees.block.door.type.double=分离
extratrees.block.door.type.full=Full extratrees.block.door.type.full=完整
< %1$s is name of the wood> < %1$s is name of the wood>
extratrees.block.plank.name=%1$s木板 extratrees.block.plank.name=%1$s木板
@@ -173,7 +173,7 @@ extratrees.block.woodstairs.name=%1$s楼梯
extratrees.block.woodfence.name=%1$s栅栏 extratrees.block.woodfence.name=%1$s栅栏
extratrees.block.woodgate.name=%1$s栅栏门 extratrees.block.woodgate.name=%1$s栅栏门
< %1$s is the adjective for the fence type, %2$s is the name of the wood > < %1$s is the adjective for the fence type, %2$s is the name of the wood >
extratrees.block.multifence.name=%2$s %1$s 门 extratrees.block.multifence.name=%2$s %1$s 门
< %3$s is the name of the second wood > < %3$s is the name of the second wood >
extratrees.block.multifence.name2=%2$s %1$s & $3$s 门 extratrees.block.multifence.name2=%2$s %1$s & $3$s 门
@@ -269,7 +269,7 @@ extratrees.species.raspberry.name=树莓
extratrees.species.blueberry.name=蓝莓 extratrees.species.blueberry.name=蓝莓
extratrees.species.cranberry.name=蔓越莓 extratrees.species.cranberry.name=蔓越莓
extratrees.species.juniper.name=杜松子 extratrees.species.juniper.name=杜松子
extratrees.species.gooseberry.name=鹅莓 extratrees.species.gooseberry.name=醋栗
extratrees.species.goldenraspberry.name=金树莓 extratrees.species.goldenraspberry.name=金树莓
extratrees.species.cinnamon.name=肉桂 extratrees.species.cinnamon.name=肉桂
extratrees.species.coconut.name=椰子 extratrees.species.coconut.name=椰子
@@ -359,6 +359,7 @@ for.extratrees.item.food.elderberry=接骨木浆果
for.extratrees.item.food.olive=橄榄 for.extratrees.item.food.olive=橄榄
for.extratrees.item.food.gingkonut=白果 for.extratrees.item.food.gingkonut=白果
for.extratrees.item.food.coffee=咖啡 for.extratrees.item.food.coffee=咖啡
for.extratrees.item.food.osangeosange=桑橙
for.extratrees.item.food.osangeorange=桑橙 for.extratrees.item.food.osangeorange=桑橙
for.extratrees.item.food.clove=丁香 for.extratrees.item.food.clove=丁香
for.extratrees.item.food.papayimar=Pahimar牌木瓜 for.extratrees.item.food.papayimar=Pahimar牌木瓜
@@ -369,7 +370,7 @@ for.extratrees.item.food.raspberry=树莓
for.extratrees.item.food.blueberry=蓝莓 for.extratrees.item.food.blueberry=蓝莓
for.extratrees.item.food.cranberry=蔓越莓 for.extratrees.item.food.cranberry=蔓越莓
for.extratrees.item.food.juniper=杜松子 for.extratrees.item.food.juniper=杜松子
for.extratrees.item.food.gooseberry=鹅莓 for.extratrees.item.food.gooseberry=醋栗
for.extratrees.item.food.goldenraspberry=金树莓 for.extratrees.item.food.goldenraspberry=金树莓
for.extratrees.item.food.coconut=椰子 for.extratrees.item.food.coconut=椰子
for.extratrees.item.food.cashew=腰果 for.extratrees.item.food.cashew=腰果
@@ -434,3 +435,6 @@ extratrees.gui.database.tab.butterfly.breeder=杂交路线
extratrees.gui.database.log=原木 extratrees.gui.database.log=原木
extratrees.gui.database.leaves=树叶 extratrees.gui.database.leaves=树叶
binniecore.beemodifier.genetic_decay=基因衰变
@@ -50,7 +50,7 @@ genetics.sequence.fully=已测序
genetics.sequence.partially=测序 %d%% genetics.sequence.partially=测序 %d%%
genetics.machine.machine.isolator=基因分离器 genetics.machine.machine.isolator=基因分离器
genetics.machine.machine.isolator.info=基因分离器将会从蜜蜂、树苗或者其它的独立个体中随机提取基因片段,并复制到空白序列中。此过程需要乙醇作为溶剂,还需要酶来切断DNA。未测序的序列可以在基因同化器中扩增,并在测序仪中进行测序。 genetics.machine.machine.isolator.info=基因分离器将会从蜜蜂、树苗或者其它的独立个体中随机提取基因片段,并复制到空白序列中。此过程需要乙醇作为溶剂,还需要酶来切断DNA。未测序的序列可以在基因同化器中扩增,并在测序仪中进行测序。此过程有小概率摧毁该个体。
genetics.machine.isolator.error.noIndividual=没有个体样本 genetics.machine.isolator.error.noIndividual=没有个体样本
genetics.machine.isolator.error.noRoom=没有空间 genetics.machine.isolator.error.noRoom=没有空间
genetics.machine.isolator.error.noVials=没有空白序列 genetics.machine.isolator.error.noVials=没有空白序列
@@ -105,7 +105,7 @@ genetics.machine.genepool.error.insufficientEnzyme=酶不足
genetics.machine.labMachine.labMachine=实验台 genetics.machine.labMachine.labMachine=实验台
genetics.machine.labMachine.analyser=分析仪 genetics.machine.labMachine.analyser=分析仪
genetics.machine.labMachine.analyser.info=分析仪可分析可增殖个体和 DNA 序列,并确定当前的基因类型。此过程需要 DNA 染料,可由紫色染料和荧石粉合成得到。 genetics.machine.labMachine.analyser.info=分析仪可分析可增殖个体和 DNA 序列,并确定当前的基因类型。此过程需要 DNA 染料,可由紫色染料和萤石粉合成得到。
genetics.machine.analyser.dnaDye=DNA 染料 genetics.machine.analyser.dnaDye=DNA 染料
genetics.machine.analyser.unanalysedItem=未经分析的物品 genetics.machine.analyser.unanalysedItem=未经分析的物品
genetics.machine.analyser.error.alreadyAnalysed.title=已经过分析 genetics.machine.analyser.error.alreadyAnalysed.title=已经过分析
@@ -122,7 +122,7 @@ genetics.machine.incubator.error.noLiquid=液体不足
genetics.machine.incubator.error.noRoom=输出槽已满 genetics.machine.incubator.error.noRoom=输出槽已满
genetics.machine.labMachine.acclimatiser=适应性调整器 genetics.machine.labMachine.acclimatiser=适应性调整器
genetics.machine.labMachine.acclimatiser.info=适应性调整器使用适应性调整物品来调整个体的温度和湿度适应性。 genetics.machine.labMachine.acclimatiser.info=适应性调整器使用适应性调整物品,来调整个体的温度和湿度适应性。此过程只有小概率成功。
genetics.machine.acclimatiser.acclimatizingItems=适应性调整物品 genetics.machine.acclimatiser.acclimatizingItems=适应性调整物品
genetics.machine.acclimatiser.error.noIndividual=没有可供调整适应性的个体 genetics.machine.acclimatiser.error.noIndividual=没有可供调整适应性的个体
genetics.machine.acclimatiser.error.noAcclimatizingItems=没有适应性调整物品 genetics.machine.acclimatiser.error.noAcclimatizingItems=没有适应性调整物品
@@ -266,3 +266,12 @@ genetics.gui.analyst.wood.flammable=可燃
genetics.gui.analyst.wood.logs=原木 genetics.gui.analyst.wood.logs=原木
genetics.gui.analyst.wood.products=精加工产物 genetics.gui.analyst.wood.products=精加工产物
genetics.gui.analyst.wood.noFruits=这种树不结果实 genetics.gui.analyst.wood.noFruits=这种树不结果实
genetics.nei.tip.loss=损耗:
genetics.nei.tip.noConsume=不被消耗
genetics.nei.tip.effect=效果: %s
genetics.nei.tip.temperature=温度
genetics.nei.tip.humidity=湿度
genetics.nei.tip.processSpeed=%dx 处理速度
genetics.nei.tip.rf=%dx 处理速度
genetics.nei.tip.databaseDesc=打开数据库并拿起一个空血清瓶. 点击已测序的血清以应用.