Compare commits

...
31 Commits
Author SHA1 Message Date
Raven Szewczyk f2f1dd1195 Make reflection Java 12+ compatible, mark mods as children of the main mod (#26)
* Update buildscript and dependencies

* Update NEI api

* Make reflection Java 12+ compatible, mark mods as children of the main mod
2023-01-25 20:47:58 +01:00
Runakai1 c70a3448e5 Revert some mistakes (#25) 2022-12-05 08:59:59 -08:00
Martin Robertz 65c6f2b591 Merge pull request #24 from GTNewHorizons/BlackmailedChadChange
Blackmailed chad change
2022-12-05 17:47:21 +01:00
Runakai1 350c7ed1af I think I fixed it? 2022-12-05 17:43:17 +01:00
Runakai1 8b07f1ff4f Blaickmailed to remove the blackmailed grouping 2022-12-05 17:09:42 +01:00
Runakai1 09b631faee Add my beloved Alright 2022-12-05 16:59:12 +01:00
Runakai1 d1d09c3bfb Grouping them blackmailers together 2022-12-05 16:52:58 +01:00
Runakai1 1189f1ccb2 Add Colen and Tyrant to chad bee 2022-12-05 16:48:34 +01:00
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
Connor-Colenso bc95495504 Merge pull request #18 from AlbertoPirillo/genetics-better-info
Genetics - Better info for Acclimatiser and Isolator
2022-08-12 22:23:46 +01:00
Alberto Pirillo 004c540346 Update Genetics Isolator's info to state that it has a chance to destroy the individual 2022-08-12 16:56:48 +02:00
Alberto Pirillo c43f1f05c5 Update Genetics Acclimatizer's info to state that it only has a chance to succeed 2022-08-11 01:42:37 +02:00
Martin Robertz 3ce7424abc Merge pull request #17 from Runakai1/bees-balance-change
Changed Format
2022-07-31 16:47:36 +07:00
Runakai1 5cafd12ce8 Changed Format
Changed Format of Names for the Chad Bee
2022-07-31 11:10:11 +02:00
Martin Robertz 9a423c4bfd Merge pull request #16 from Runakai1/bees-balance-change
bees-balance-changes in ExtraBees
2022-07-31 14:17:55 +07:00
Runakai1 e4d248b5a9 Changed Mutatron and Flowers
Added a new Bedrock Flower
Modified Mutatron Numbers based on Wiki. Also buffed some.
Uranfuel: 4->8
MOXFuel removed
Plutonium: 8->15
smallPlutonium: 5->9
Uran235: 4->10
smallUran: 2.5 -> 5.5
Nether star: 50
2022-07-30 23:15:46 +02:00
Runakai1 4520180638 added Jimbo
(he made the multiblock design) VERY BEAUTIFUL
2022-07-29 18:25:15 +02:00
Runakai1 7d14960a72 Mitch.
Mitch.
2022-07-29 18:19:15 +02:00
Runakai1 66bb31bfa8 Added one Bee
Added the Chad bee
Added RestrictedByGroup breeding requirement
2022-07-29 17:42:00 +02:00
Jason Mitchell 37bb054dd3 [ci skip] Migrate github actions to GTNH-Actions-Workflows 2022-07-16 10:46:59 -07:00
25 changed files with 832 additions and 475 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
+2 -34
View File
@@ -1,5 +1,3 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build and test
@@ -11,35 +9,5 @@ on:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup the workspace
run: ./gradlew setupCIWorkspace
- name: Build the mod
run: ./gradlew build
- name: Run server for 1.5 minutes
run: |
mkdir run
echo "eula=true" > run/eula.txt
timeout 90 ./gradlew runServer 2>&1 | tee -a server.log || true
- name: Test no errors reported during server run
run: |
chmod +x .github/scripts/test-no-error-reports.sh
.github/scripts/test-no-error-reports.sh
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
secrets: inherit
+7 -44
View File
@@ -1,51 +1,14 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Release tagged build
on:
push:
tags:
- '*'
tags: [ '*' ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup the workspace
run: ./gradlew setupCIWorkspace
- name: Build the mod
run: ./gradlew build
- name: Release under current tag
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
prerelease: false
title: "${{ env.RELEASE_VERSION }}"
files: build/libs/*.jar
- name: Publish to Maven
run: ./gradlew publish
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
release-tags:
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
secrets: inherit
+387 -193
View File
@@ -1,14 +1,17 @@
//version: 1656760175
//version: 1674409054
/*
DO NOT CHANGE THIS FILE!
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.
*/
DO NOT CHANGE THIS FILE!
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/master/build.gradle for updates.
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
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.StyledTextOutputFactory
@@ -21,10 +24,17 @@ import java.util.zip.ZipOutputStream
buildscript {
repositories {
mavenCentral()
maven {
name 'forge'
url 'https://maven.minecraftforge.net'
}
maven {
// GTNH ForgeGradle and ASM 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/'
@@ -33,32 +43,41 @@ 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'
//Overwrite the current ASM version to fix shading newer than java 8 applicatations.
classpath 'org.ow2.asm:asm-debug-all-custom:5.0.3'
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.13'
}
}
plugins {
id 'java-library'
id 'idea'
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"
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.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()) {
apply plugin: 'com.palantir.git-version'
@@ -84,38 +103,14 @@ idea {
}
}
// Spotless autoformatter
// See https://github.com/diffplug/spotless/tree/main/plugin-gradle
// Can be locally toggled via spotless:off/spotless:on comments
spotless {
encoding 'UTF-8'
boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false
format 'misc', {
target '.gitignore'
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 (!disableSpotless) {
apply plugin: 'com.diffplug.spotless'
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())
}
@@ -140,66 +135,80 @@ checkPropertyExists("containsMixinsAndOrCoreModOnly")
checkPropertyExists("usesShadowedDependencies")
checkPropertyExists("developmentEnvironmentUserName")
boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false
boolean usesMixinDebug = project.findProperty('usesMixinDebug') ?: project.usesMixins.toBoolean()
String channel = project.findProperty('channel') ? project.channel : 'stable'
String mappingsVersion = project.findProperty('mappingsVersion') ? project.mappingsVersion : '12'
String remoteMappings = project.findProperty('remoteMappings') ? project.remoteMappings : 'https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/'
propertyDefaultIfUnset("noPublishedSources", false)
propertyDefaultIfUnset("usesMixinDebug", project.usesMixins)
propertyDefaultIfUnset("forceEnableMixins", false)
propertyDefaultIfUnset("channel", "stable")
propertyDefaultIfUnset("mappingsVersion", "12")
propertyDefaultIfUnset("modrinthProjectId", "")
propertyDefaultIfUnset("modrinthRelations", "")
propertyDefaultIfUnset("curseForgeProjectId", "")
propertyDefaultIfUnset("curseForgeRelations", "")
propertyDefaultIfUnset("minimizeShadowedDependencies", true)
String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/"
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())) {
final String modGroupPath = modGroup.toString().replaceAll("\\.", "/")
final String apiPackagePath = apiPackage.toString().replaceAll("\\.", "/")
String targetPackageJava = javaSourceDir + modGroupPath
String targetPackageScala = scalaSourceDir + modGroupPath
String targetPackageKotlin = kotlinSourceDir + modGroupPath
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) {
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 (apiPackage) {
targetPackageJava = javaSourceDir + modGroupPath + "/" + apiPackagePath
targetPackageScala = scalaSourceDir + modGroupPath + "/" + apiPackagePath
targetPackageKotlin = kotlinSourceDir + modGroupPath + "/" + apiPackagePath
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()) {
throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!")
if (usesMixins.toBoolean()) {
if (mixinsPackage.isEmpty()) {
throw new GradleException("\"usesMixins\" requires \"mixinsPackage\" to be set!")
}
final String mixinPackagePath = mixinsPackage.toString().replaceAll("\\.", "/")
final String mixinPluginPath = mixinPlugin.toString().replaceAll("\\.", "/")
targetPackageJava = javaSourceDir + modGroupPath + "/" + mixinPackagePath
targetPackageScala = scalaSourceDir + modGroupPath + "/" + mixinPackagePath
targetPackageKotlin = kotlinSourceDir + modGroupPath + "/" + mixinPackagePath
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)
}
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)
}
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())) {
throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
if (!mixinPlugin.isEmpty()) {
String targetFileJava = javaSourceDir + modGroupPath + "/" + mixinPluginPath + ".java"
String targetFileScala = scalaSourceDir + modGroupPath + "/" + mixinPluginPath + ".scala"
String targetFileScalaJava = scalaSourceDir + modGroupPath + "/" + mixinPluginPath + ".java"
String targetFileKotlin = kotlinSourceDir + modGroupPath + "/" + mixinPluginPath + ".kt"
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) {
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 (coreModClass) {
final String coreModPath = coreModClass.toString().replaceAll("\\.", "/")
String targetFileJava = javaSourceDir + modGroupPath + "/" + coreModPath + ".java"
String targetFileScala = scalaSourceDir + modGroupPath + "/" + coreModPath + ".scala"
String targetFileScalaJava = scalaSourceDir + modGroupPath + "/" + coreModPath + ".java"
String targetFileKotlin = kotlinSourceDir + modGroupPath + "/" + coreModPath + ".kt"
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)
}
}
@@ -228,9 +237,9 @@ try {
}
catch (Exception ignored) {
out.style(Style.Failure).text(
'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' +
'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)'
'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' +
'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'
identifiedVersion = versionOverride
@@ -240,30 +249,29 @@ 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
}
def arguments = []
def jvmArguments = []
if (usesMixins.toBoolean()) {
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
arguments += [
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
]
if (usesMixinDebug.toBoolean()) {
jvmArguments += [
"-Dmixin.debug.countInjections=true",
"-Dmixin.debug.verbose=true",
"-Dmixin.debug.export=true"
"-Dmixin.debug.countInjections=true",
"-Dmixin.debug.verbose=true",
"-Dmixin.debug.export=true"
]
}
}
@@ -273,17 +281,19 @@ minecraft {
runDir = 'run'
if (replaceGradleTokenInFile) {
replaceIn replaceGradleTokenInFile
if(gradleTokenModId) {
for (f in replaceGradleTokenInFile.split(',')) {
replaceIn f
}
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
}
}
@@ -292,7 +302,7 @@ minecraft {
args(arguments)
jvmArgs(jvmArguments)
if(developmentEnvironmentUserName) {
if (developmentEnvironmentUserName) {
args("--username", developmentEnvironmentUserName)
}
}
@@ -303,16 +313,20 @@ minecraft {
}
}
if(file('addon.gradle').exists()) {
if (file('addon.gradle').exists()) {
apply from: 'addon.gradle'
}
apply from: 'repositories.gradle'
configurations {
implementation.extendsFrom(shadowImplementation) // TODO: remove after all uses are refactored
implementation.extendsFrom(shadowCompile)
implementation.extendsFrom(shadeCompile)
// TODO: remove Compile after all uses are refactored to Implementation
for (config in [shadowImplementation, shadowCompile, shadeCompile]) {
compileClasspath.extendsFrom(config)
runtimeClasspath.extendsFrom(config)
testCompileClasspath.extendsFrom(config)
testRuntimeClasspath.extendsFrom(config)
}
}
repositories {
@@ -320,33 +334,33 @@ repositories {
name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/'
}
if(usesMixins.toBoolean()) {
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
maven {
name 'sponge'
url 'https://repo.spongepowered.org/repository/maven-public'
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
}
maven {
url 'https://jitpack.io'
if (usesMixinDebug.toBoolean()) {
maven {
name = "Fabric Maven"
url = "https://maven.fabricmc.net/"
}
}
}
}
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')
// 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
exclude module: 'launchwrapper'
exclude module: 'guava'
exclude module: 'gson'
exclude module: 'commons-io'
exclude module: 'log4j-core'
annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.3:processor')
if (usesMixinDebug.toBoolean()) {
runtimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16')
testRuntimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16')
}
compile('com.github.GTNewHorizons:SpongeMixins:1.5.0')
}
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
compile('com.gtnewhorizon:gtnhmixins:2.1.3')
}
}
@@ -358,13 +372,18 @@ def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"
task generateAssets {
if (usesMixins.toBoolean()) {
def mixinConfigFile = getFile("/src/main/resources/mixins." + modId + ".json");
def mixinConfigFile = getFile("/src/main/resources/mixins." + modId + ".json")
if (!mixinConfigFile.exists()) {
def mixinPluginLine = ""
if(!mixinPlugin.isEmpty()) {
// We might not have a mixin plugin if we're using early/late mixins
mixinPluginLine += """\n "plugin": "${modGroup}.${mixinPlugin}", """
}
mixinConfigFile.text = """{
"required": true,
"minVersion": "0.7.11",
"package": "${modGroup}.${mixinsPackage}",
"plugin": "${modGroup}.${mixinPlugin}",
"minVersion": "0.8.5-GTNH",
"package": "${modGroup}.${mixinsPackage}",${mixinPluginLine}
"refmap": "${mixingConfigRefMap}",
"target": "@env(DEFAULT)",
"compatibilityLevel": "JAVA_8",
@@ -393,8 +412,13 @@ shadowJar {
attributes(getManifestAttributes())
}
minimize() // This will only allow shading for actually used classes
configurations = [project.configurations.shadowImplementation, project.configurations.shadowCompile]
if (minimizeShadowedDependencies.toBoolean()) {
minimize() // This will only allow shading for actually used classes
}
configurations = [
project.configurations.shadowImplementation,
project.configurations.shadowCompile
]
dependsOn(relocateShadowJar)
}
@@ -409,38 +433,38 @@ jar {
attributes(getManifestAttributes())
}
if(usesShadowedDependencies.toBoolean()) {
if (usesShadowedDependencies.toBoolean()) {
dependsOn(shadowJar)
enabled = false
}
}
reobf {
if(usesMixins.toBoolean()) {
if (usesMixins.toBoolean()) {
addExtraSrgFile mixinSrg
}
}
afterEvaluate {
if(usesMixins.toBoolean()) {
if (usesMixins.toBoolean()) {
tasks.compileJava {
options.compilerArgs += [
"-AreobfSrgFile=${tasks.reobf.srg}",
"-AoutSrgFile=${mixinSrg}",
"-AoutRefMapFile=${refMap}",
// Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
"-XDenableSunApiLintControl",
"-XDignore.symbol.file"
"-AreobfSrgFile=${tasks.reobf.srg}",
"-AoutSrgFile=${mixinSrg}",
"-AoutRefMapFile=${refMap}",
// Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
"-XDenableSunApiLintControl",
"-XDignore.symbol.file"
]
}
}
}
runClient {
if(developmentEnvironmentUserName) {
if (developmentEnvironmentUserName) {
arguments += [
"--username",
developmentEnvironmentUserName
"--username",
developmentEnvironmentUserName
]
}
@@ -455,9 +479,9 @@ runServer {
tasks.withType(JavaExec).configureEach {
javaLauncher.set(
javaToolchains.launcherFor {
languageVersion = projectJavaVersion
}
javaToolchains.launcherFor {
languageVersion = projectJavaVersion
}
)
}
@@ -465,6 +489,7 @@ processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
exclude("spotless.gradle")
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
@@ -472,48 +497,49 @@ processResources {
// replace modVersion and minecraftVersion
expand "minecraftVersion": project.minecraft.version,
"modVersion": modVersion,
"modId": modId,
"modName": modName
"modVersion": modVersion,
"modId": modId,
"modName": modName
}
if(usesMixins.toBoolean()) {
if (usesMixins.toBoolean()) {
from refMap
}
// copy everything else that's not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
exclude 'spotless.gradle'
}
}
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')
}
@@ -531,8 +557,13 @@ task shadowDevJar(type: ShadowJar) {
attributes(getManifestAttributes())
}
minimize() // This will only allow shading for actually used classes
configurations = [project.configurations.shadowImplementation, project.configurations.shadowCompile]
if (minimizeShadowedDependencies.toBoolean()) {
minimize() // This will only allow shading for actually used classes
}
configurations = [
project.configurations.shadowImplementation,
project.configurations.shadowCompile
]
}
task relocateShadowDevJar(type: ConfigureShadowRelocation) {
@@ -560,22 +591,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) {
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
from(sourceSets.main.allSource) {
include modGroupPath + "/" + apiPackagePath + '/**'
}
from (sourceSets.main.output) {
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
from(sourceSets.main.output) {
include modGroupPath + "/" + apiPackagePath + '/**'
}
from (sourceSets.main.resources.srcDirs) {
from(sourceSets.main.resources.srcDirs) {
include("LICENSE")
}
@@ -583,11 +614,11 @@ task apiJar(type: Jar) {
}
artifacts {
if(!noPublishedSources) {
if (!noPublishedSources) {
archives sourcesJar
}
archives devJar
if(apiPackage) {
if (apiPackage) {
archives apiJar
}
}
@@ -605,10 +636,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"
@@ -623,8 +654,11 @@ publishing {
// remove extra garbage from minecraft and minecraftDeps configuration
pom.withXml {
def badArtifacts = [:].withDefault {[] as Set<String>}
for (configuration in [projectConfigs.minecraft, projectConfigs.minecraftDeps]) {
def badArtifacts = [:].withDefault { [] as Set<String> }
for (configuration in [
projectConfigs.minecraft,
projectConfigs.minecraftDeps
]) {
for (dependency in configuration.allDependencies) {
badArtifacts[dependency.group == null ? "" : dependency.group] += dependency.name
}
@@ -653,6 +687,113 @@ publishing {
}
}
if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) {
apply plugin: 'com.modrinth.minotaur'
File changelogFile = new File(System.getenv("CHANGELOG_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])
}
}
if (usesMixins.toBoolean()) {
addModrinthDep("required", "project", "gtnhmixins")
}
tasks.modrinth.dependsOn(build)
tasks.publish.dependsOn(tasks.modrinth)
}
if (curseForgeProjectId.size() != 0 && System.getenv("CURSEFORGE_TOKEN") != null) {
apply plugin: 'com.matthewprenger.cursegradle'
File changelogFile = new File(System.getenv("CHANGELOG_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])
}
}
if (usesMixins.toBoolean()) {
addCurseForgeRelation("requiredDependency", "gtnhmixins")
}
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
task updateBuildScript {
doLast {
@@ -662,7 +803,7 @@ task updateBuildScript {
}
}
if (isNewBuildScriptVersionAvailable(projectDir.toString())) {
if (!project.getGradle().startParameter.isOffline() && isNewBuildScriptVersionAvailable(projectDir.toString())) {
if (autoUpdateBuildScript.toBoolean()) {
performBuildScriptUpdate(projectDir.toString())
} else {
@@ -671,7 +812,40 @@ if (isNewBuildScriptVersionAvailable(projectDir.toString())) {
}
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) {
@@ -679,6 +853,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!")
boolean settingsupdated = verifySettingsGradle()
settingsupdated = verifyGitAttributes() || settingsupdated
if (settingsupdated)
throw new GradleException("Settings has been updated, please re-run task.")
return true
}
return false
@@ -698,7 +876,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 ""
@@ -724,16 +902,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])
}
}
@@ -746,8 +924,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
@@ -756,14 +934,14 @@ static int replaceParams(File file, Map<String, String> params) {
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
@@ -814,16 +992,16 @@ def deobf(String sourceURL) {
//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("\\."))
@@ -831,7 +1009,7 @@ def deobf(String sourceURL) {
hostName = String.join(".", parts)
return deobf(sourceURL, "$hostName/$fileName")
} catch(Exception e) {
} catch (Exception e) {
return deobf(sourceURL, "deobf/${sourceURL.hashCode()}")
}
}
@@ -846,12 +1024,13 @@ def deobf(String sourceURL, String rawFileName) {
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
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 mappingsZIP = "$cacheDir/forge_gradle/maven_downloader/de/oceanlabs/mcp/mcp_snapshot_nodoc/$id/mcp_snapshot_nodoc-${id}.zip"
@@ -887,7 +1066,7 @@ def deobf(String sourceURL, String rawFileName) {
def zipMappings(String zipPath, String url, String bon2Dir) {
File zipFile = new File(zipPath)
if(zipFile.exists()) {
if (zipFile.exists()) {
return
}
@@ -927,6 +1106,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) {
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
}
+5 -4
View File
@@ -1,11 +1,12 @@
// Add your dependencies here
dependencies {
compile('com.github.GTNewHorizons:ForestryMC:4.4.6:dev')
compile('com.github.GTNewHorizons:NotEnoughItems:2.2.17-GTNH:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.0.10:dev')
compile('com.github.GTNewHorizons:ForestryMC:4.5.6:dev')
compile('com.github.GTNewHorizons:NotEnoughItems:2.3.21-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.27:api')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.28:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
compileOnly('curse.maven:cofh-lib-220333:2388748')
}
}
+53 -1
View File
@@ -15,6 +15,13 @@ autoUpdateBuildScript = false
minecraftVersion = 1.7.10
forgeVersion = 10.13.4.1614
# Specify a MCP channel and mappings version for dependency deobfuscation and the deobfParams task.
channel = stable
mappingsVersion = 12
# Define other MCP mappings for dependency deobfuscation
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
# restart Minecraft in development. Choose this dependent on your mod:
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
@@ -43,6 +50,8 @@ accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
# Adds some debug arguments like verbose output and export
usesMixinDebug = false
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
@@ -55,10 +64,53 @@ coreModClass =
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
forceEnableMixins = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies = false
# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token.
# The project's ID on Modrinth. Can be either the slug or the ID.
# Leave this empty if you don't want to publish on Modrinth.
modrinthProjectId =
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
# Syntax: scope1-type1:name1;scope2-type2:name2;...
# Where scope can be one of [required, optional, incompatible, embedded],
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
modrinthRelations =
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
# The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge.
curseForgeProjectId =
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
# Syntax: type1:name1;type2:name2;...
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
curseForgeRelations =
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# projects. New projects should not use this parameter.
customArchiveBaseName = binnie-mods
# Optional parameter to prevent the source code from being published
# noPublishedSources =
# Uncomment this to disable spotless checks
# This should only be uncommented to keep it easier to sync with upstream/other forks.
# That is, if there is no other active fork/upstream, NEVER change this.
# disableSpotless = true
Vendored
+100 -100
View File
@@ -1,100 +1,100 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+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
}
+1 -1
View File
@@ -51,7 +51,7 @@ import net.minecraftforge.client.event.TextureStitchEvent;
name = "Binnie Core",
version = BinnieCore.VERSION,
useMetadata = true,
dependencies = "after:Forestry@[4.2,)")
dependencies = "after:Forestry@[4.2,),required-after:gtnhlib@[0.0.10,)")
public class BinnieCore extends AbstractMod {
@Mod.Instance("BinnieCore")
public static BinnieCore instance;
@@ -80,7 +80,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
public void loadUsageRecipes(FluidStack ingredient) {}
@Override
public List<String> handleTooltip(GuiRecipe guiRecipe, List<String> currenttip, int recipe) {
public List<String> handleTooltip(GuiRecipe<?> guiRecipe, List<String> currenttip, int recipe) {
super.handleTooltip(guiRecipe, currenttip, recipe);
CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe);
if (GuiContainerManager.shouldShowTooltip(guiRecipe)) {
@@ -98,7 +98,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
}
public List<String> provideTooltip(
GuiRecipe guiRecipe, List<String> currenttip, CachedBaseRecipe crecipe, Point relMouse) {
GuiRecipe<?> guiRecipe, List<String> currenttip, CachedBaseRecipe crecipe, Point relMouse) {
if (crecipe.getFluidTanks() != null) {
for (PositionedFluidTank tank : crecipe.getFluidTanks()) {
if (tank.position.contains(relMouse)) {
@@ -111,7 +111,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
@Override
public List<String> handleItemTooltip(
GuiRecipe guiRecipe, ItemStack itemStack, List<String> currenttip, int recipe) {
GuiRecipe<?> guiRecipe, ItemStack itemStack, List<String> currenttip, int recipe) {
super.handleItemTooltip(guiRecipe, itemStack, currenttip, recipe);
CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe);
Point mouse = GuiDraw.getMousePosition();
@@ -125,7 +125,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
}
public List<String> provideItemTooltip(
GuiRecipe guiRecipe,
GuiRecipe<?> guiRecipe,
ItemStack itemStack,
List<String> currenttip,
CachedBaseRecipe crecipe,
@@ -151,7 +151,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
}
@Override
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe) {
public boolean keyTyped(GuiRecipe<?> gui, char keyChar, int keyCode, int recipe) {
if (keyCode == NEIClientConfig.getKeyBinding("gui.recipe")) {
if (this.transferFluidTank(gui, recipe, false)) {
return true;
@@ -165,7 +165,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
}
@Override
public boolean mouseClicked(GuiRecipe gui, int button, int recipe) {
public boolean mouseClicked(GuiRecipe<?> gui, int button, int recipe) {
if (button == 0) {
if (this.transferFluidTank(gui, recipe, false)) {
return true;
@@ -178,7 +178,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
return super.mouseClicked(gui, button, recipe);
}
protected boolean transferFluidTank(GuiRecipe guiRecipe, int recipe, boolean usage) {
protected boolean transferFluidTank(GuiRecipe<?> guiRecipe, int recipe, boolean usage) {
CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe);
if (crecipe.getFluidTanks() != null) {
@@ -32,13 +32,13 @@ public class ModuleApiary implements IInitializable {
BinnieCore.proxy.createObject("binnie.core.machines.RendererMachine"));
ModuleApiary.blockComponent = machineGroup.getBlock();
AlvearyMutator.addMutationItem(new ItemStack(Blocks.soul_sand), 1.5f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("UranFuel"), 4.0f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("MOXFuel"), 10.0f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("Plutonium"), 8.0f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("smallPlutonium"), 5.0f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("Uran235"), 4.0f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("smallUran235"), 2.5f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("UranFuel"), 8.0f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("Plutonium"), 15.0f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("smallPlutonium"), 9.0f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("Uran235"), 10.0f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("smallUran235"), 5.5f);
AlvearyMutator.addMutationItem(Mods.ic2.stack("Uran238"), 2.0f);
AlvearyMutator.addMutationItem(new ItemStack(Items.nether_star), 50.0f);
AlvearyMutator.addMutationItem(new ItemStack(Items.ender_pearl), 2.0f);
AlvearyMutator.addMutationItem(new ItemStack(Items.ender_eye), 4.0f);
@@ -283,7 +283,7 @@ public enum ExtraBeeBranchDefinition implements IBranchDefinition {
FTB("Eftebeapis") {
@Override
protected void setBranchProperties(IAllele[] template) {
AlleleHelper.instance.set(template, EnumBeeChromosome.SPEED, EnumAllele.Speed.SLOWER);
AlleleHelper.instance.set(template, EnumBeeChromosome.SPEED, EnumAllele.Speed.FASTEST);
AlleleHelper.instance.set(template, EnumBeeChromosome.LIFESPAN, EnumAllele.Lifespan.NORMAL);
AlleleHelper.instance.set(template, EnumBeeChromosome.EFFECT, AlleleEffect.effectBeatific);
AlleleHelper.instance.set(template, EnumBeeChromosome.FERTILITY, EnumAllele.Fertility.MAXIMUM);
@@ -2,6 +2,7 @@ package binnie.extrabees.genetics;
import binnie.core.Mods;
import binnie.extrabees.genetics.effect.ExtraBeesEffect;
import binnie.extrabees.genetics.requirements.RequirementPerson;
import binnie.extrabees.products.EnumHoneyComb;
import binnie.extrabees.products.ItemHoneyComb;
import binnie.genetics.genetics.AlleleHelper;
@@ -29,6 +30,7 @@ import java.util.Locale;
import java.util.Map;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.BiomeDictionary;
public enum ExtraBeeDefinition implements IBeeDefinition {
@@ -1638,6 +1640,62 @@ public enum ExtraBeeDefinition implements IBeeDefinition {
registerMutation(BeeDefinition.ENDED, RELIC, 2).restrictPerson("jadedcat");
}
},
CHAD(ExtraBeeBranchDefinition.FTB, "merciboocoup", true, new Color(0x2157DB), new Color(0xD2ABD1)) {
@Override
protected void setSpeciesProperties(IAlleleBeeSpeciesCustom beeSpecies) {
beeSpecies
.addProduct(new ItemStack(Items.cake, 1), 1f)
.addSpecialty(Mods.forestry.stack("pollenFertile"), 0.50f)
.addSpecialty(EnumHoneyComb.MILK.get(1), 0.55f)
.setIsNotCounted()
.setHasEffect();
}
protected void setAlleles(IAllele[] template) {
AlleleHelper.instance.set(template, EnumBeeChromosome.NOCTURNAL, true);
AlleleHelper.instance.set(template, EnumBeeChromosome.TEMPERATURE_TOLERANCE, EnumAllele.Tolerance.BOTH_5);
AlleleHelper.instance.set(template, EnumBeeChromosome.HUMIDITY_TOLERANCE, EnumAllele.Tolerance.BOTH_5);
AlleleHelper.instance.set(
template, EnumBeeChromosome.EFFECT, AlleleHelper.getAllele(ExtraBeesEffect.BIRTHDAY.getUID()));
}
@Override
protected void registerMutations() {
registerMutation(BeeDefinition.CULTIVATED, CELEBRATORY, 5)
.restrictPerson(new RequirementPerson()
.add(
name -> ""
+ EnumChatFormatting.DARK_RED
+ EnumChatFormatting.BOLD + "R"
+ EnumChatFormatting.RED
+ EnumChatFormatting.BOLD + "u"
+ EnumChatFormatting.GOLD
+ EnumChatFormatting.BOLD + "n"
+ EnumChatFormatting.YELLOW
+ 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",
"mitchej123",
"minecraft7771",
"_Timbo",
"kuba6000",
"Alrightsc",
"YeetYeetDatBoi",
"DreamMasterXXL",
"Colen"));
}
},
/* AUSTERE BRANCH */
HAZARDOUS(BeeBranchDefinition.AUSTERE, "infensus", true, new Color(0xb06c28), new Color(0xffdc16)) {
@@ -1,8 +1,6 @@
package binnie.extrabees.genetics;
import binnie.extrabees.genetics.requirements.DummyMutationCondition;
import binnie.extrabees.genetics.requirements.IMutationRequirement;
import binnie.extrabees.genetics.requirements.RequirementPerson;
import binnie.extrabees.genetics.requirements.*;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBeeGenome;
@@ -13,6 +11,7 @@ import forestry.api.genetics.IAllele;
import forestry.api.genetics.IMutation;
import forestry.apiculture.genetics.BeeMutation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class ExtraBeeMutation extends BeeMutation implements IBeeMutationCustom {
@@ -46,9 +45,19 @@ public class ExtraBeeMutation extends BeeMutation implements IBeeMutationCustom
return super.getChance(housing, allele0, allele1, genome0, genome1);
}
public void restrictPerson(String nickname) {
RequirementPerson requirement = new RequirementPerson(nickname);
public void restrictPerson(String... nicknames) {
restrictPerson(new RequirementPerson(nicknames));
}
public void restrictPerson(RequirementPerson requirement) {
requirements.add(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")));
}
}
}
@@ -39,7 +39,8 @@ public enum ExtraBeesFlowers implements IFlowerProvider, IAlleleFlowers, IChromo
LEAVES,
SAPLING,
FRUIT,
MYSTICAL;
MYSTICAL,
BEDROCK;
protected boolean dominant;
@@ -113,6 +114,9 @@ public enum ExtraBeesFlowers implements IFlowerProvider, IAlleleFlowers, IChromo
case WOOD:
return new ItemStack[] {new ItemStack(Blocks.log)};
case BEDROCK:
return new ItemStack[] {new ItemStack(Blocks.bedrock)};
}
return new ItemStack[0];
}
@@ -162,6 +166,8 @@ public enum ExtraBeesFlowers implements IFlowerProvider, IAlleleFlowers, IChromo
case MYSTICAL:
return block == Mods.botania.block("flower");
case BEDROCK:
return block == Blocks.bedrock;
}
return false;
}
@@ -4,22 +4,58 @@ 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.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 {
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) {
this.name = name;
public RequirementPerson(String... names) {
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
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
public boolean fufilled(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
String ownerName = housing.getOwner().getName();
return ownerName != null && ownerName.equals(name);
return ownerName != null && names.contains(ownerName);
}
}
+17 -17
View File
@@ -3,7 +3,7 @@ package binnie.extratrees;
import binnie.core.block.TileEntityMetadata;
import forestry.api.arboriculture.EnumWoodType;
import forestry.arboriculture.tiles.TileWood;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
@@ -14,9 +14,21 @@ import net.minecraft.world.WorldSettings;
import net.minecraft.world.WorldSettings.GameType;
import net.minecraft.world.WorldType;
import net.minecraft.world.chunk.IChunkProvider;
import sun.reflect.ReflectionFactory;
import sun.misc.Unsafe;
public class FakeWorld extends World {
private static Unsafe unsafe;
static {
try {
Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
theUnsafe.setAccessible(true);
unsafe = (Unsafe) theUnsafe.get(null);
} catch (ReflectiveOperationException e) {
throw new RuntimeException(e);
}
}
public static FakeWorld instance = SilentObjectCreator.create(FakeWorld.class);
protected Block block;
@@ -106,22 +118,10 @@ public class FakeWorld extends World {
* Creating objects without calling constructors.
*/
public static <T> T create(Class<T> clazz) {
return create(clazz, Object.class);
}
/**
* Creating objects without calling constructors.
*/
public static <T> T create(Class<T> clazz, Class<? super T> parent) {
try {
ReflectionFactory rf = ReflectionFactory.getReflectionFactory();
Constructor objDef = parent.getDeclaredConstructor();
Constructor intConstr = rf.newConstructorForSerialization(clazz, objDef);
return clazz.cast(intConstr.newInstance());
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new IllegalStateException("Cannot create object", e);
return clazz.cast(unsafe.allocateInstance(clazz));
} catch (InstantiationException e) {
throw new IllegalStateException(e);
}
}
}
@@ -6,6 +6,7 @@ import binnie.extratrees.ExtraTrees;
import binnie.extratrees.block.FruitPod;
import binnie.extratrees.config.ConfigurationMain;
import binnie.extratrees.item.Food;
import com.gtnewhorizon.gtnhlib.reflect.Fields;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.arboriculture.EnumTreeChromosome;
@@ -18,7 +19,6 @@ import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IFruitFamily;
import forestry.arboriculture.FruitProviderNone;
import forestry.arboriculture.genetics.alleles.AlleleTreeSpecies;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -254,12 +254,9 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
try {
IAlleleFruit lemon = (IAlleleFruit) AlleleManager.alleleRegistry.getAllele("forestry.fruitLemon");
FruitProviderNone prov = (FruitProviderNone) lemon.getProvider();
Field f = FruitProviderNone.class.getDeclaredField("family");
Field modifiersField = Field.class.getDeclaredField("modifiers");
f.setAccessible(true);
modifiersField.setAccessible(true);
modifiersField.setInt(f, f.getModifiers() & 0xFFFFFFEF);
f.set(prov, familyCitrus);
Fields.ofClass(FruitProviderNone.class)
.getField(Fields.LookupType.DECLARED, "family", IFruitFamily.class)
.setValue(prov, familyCitrus);
} catch (Exception e) {
e.printStackTrace();
}
@@ -439,6 +439,8 @@ extrabees.species.lightgray.name=Ashen
extrabees.species.celebratory.name=Celebratory
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.chad.name=Chad
extrabees.species.chad.desc=GTNH Bienen: Das Beste Was Es Gibt.
extrabees.species.glowstone.name=Glowering
extrabees.species.hazardous.name=Hazardous
extrabees.species.nickel.name=Lustered
@@ -580,6 +580,8 @@ extrabees.species.celebratory.name=Праздничная
# Мерзкая ветвь
extrabees.species.jaded.name=Изнурённая
extrabees.species.jaded.desc=Я разводил этих пчёл и всё, что я получил - это кроваво-фиолетовый краситель!|Jaded, Sengir's Chosen
extrabees.species.chad.name=конфетти
extrabees.species.chad.desc=GTNH Bienen: Das Beste Was Es Gibt.
# Суровая ветвь
extrabees.species.hazardous.name=Опасная
@@ -64,7 +64,7 @@ extrabees.item.comb.limegreen=染色蜂窝(黄绿)
extrabees.item.comb.magenta=染色蜂窝(品红)
extrabees.item.comb.lightgray=染色蜂窝(淡灰)
extrabees.item.comb.nickel=镍蜂窝
extrabees.item.comb.glowstone=荧石蜂窝
extrabees.item.comb.glowstone=萤石蜂窝
extrabees.item.comb.saltpeter=硝石蜂窝
extrabees.item.comb.compost=堆肥蜂窝
extrabees.item.comb.sawdust=木屑蜂窝
@@ -127,7 +127,7 @@ extrabees.item.template.corrupted=脏的模版
extrabees.item.template.name=%s 模版
extrabees.item.template.empty=空白模版
extrabees.item.database=养蜂人数据库
extrabees.item.database=养蜂员数据库
extrabees.item.masterDatabase=养蜂大师数据库
extrabees.item.database.tooltip=风光尽在盒中
@@ -162,7 +162,7 @@ extrabees.item.yelloriumDust=黄铀砂
extrabees.item.blutoniumDust=蓝钚砂
extrabees.item.cyaniteDust=蓝晶砂
extrabees.block.apiaristMachine.name=养蜂人机器方块
extrabees.block.apiaristMachine.name=养蜂员机器方块
extrabees.block.geneticMachine.name=基因机器方块
extrabees.block.advGeneticMachine.name=高级基因机器方块
extrabees.block.ectoplasm.name=胶质网
@@ -299,33 +299,33 @@ extrabees.flowers.fruit.name=水果
extrabees.flowers.mystical.name=神秘
extrabees.species.arid.name=干旱
extrabees.species.arid.desc=它们喜欢干旱的大陆,它们的蜂窝几乎都由蜡组成,少有蜂蜜。|养蜂人手册
extrabees.species.arid.desc=它们喜欢干旱的大陆,它们的蜂窝几乎都由蜡组成,少有蜂蜜。|养蜂员手册
extrabees.species.barren.name=荒芜
extrabees.species.barren.desc=这种对沙漠的偏爱,使得它们可以生活在完全没有花的世界。|养蜂人手册
extrabees.species.barren.desc=这种对沙漠的偏爱,使得它们可以生活在完全没有花的世界。|养蜂员手册
extrabees.species.desolate.name=荒凉
extrabees.species.desolate.desc=被诅咒的荒芜之地对于别的生物来说是地狱,是万物的凋零,而这种蜜蜂却能在这种环境里生生不息。|养蜂人手册
extrabees.species.desolate.desc=被诅咒的荒芜之地对于别的生物来说是地狱,是万物的凋零,而这种蜜蜂却能在这种环境里生生不息。|养蜂员手册
extrabees.species.gnawing.name=痛苦
extrabees.species.rotten.name=腐烂
extrabees.species.rotten.desc=这些蜜蜂对死去的动物的腐肉有种不寻常的兴趣,它们甚至会在蜂巢里储存腐肉。它们的气味也会吸引一些比较难闻的生物(僵尸)。|养蜂人手册
extrabees.species.rotten.desc=这些蜜蜂对死去的动物的腐肉有种不寻常的兴趣,它们甚至会在蜂巢里储存腐肉。它们的气味也会吸引一些比较难闻的生物(僵尸)。|养蜂员手册
extrabees.species.bone.name=骷髅
extrabees.species.bone.desc=因为在野外它们很难保卫它们的家,所以它们吸引了其他的生物(骷髅)来保卫它们的蜂房。|养蜂人手册
extrabees.species.bone.desc=因为在野外它们很难保卫它们的家,所以它们吸引了其他的生物(骷髅)来保卫它们的蜂房。|养蜂员手册
extrabees.species.creeper.name=爬行者
extrabees.species.creeper.desc=你不是很确定你会不会听到它们发出爆炸声。|Binnie,养蜂人
extrabees.species.creeper.desc=你不是很确定你会不会听到它们发出爆炸声。|Binnie,养蜂员
extrabees.species.decomposing.name=分解
extrabees.species.rock.name=石头
extrabees.species.rock.desc=如果只有我能发现这些旋转的蜜蜂的话,我或许会听到一些美妙的音乐(摇滚乐)。|神秘的养蜂人
extrabees.species.rock.desc=如果只有我能发现这些旋转的蜜蜂的话,我或许会听到一些美妙的音乐(摇滚乐)。|神秘的养蜂员
extrabees.species.stone.name=忍耐
extrabees.species.stone.desc=它们的蜂巢一部分以石头打造,并且消耗的蜡也比以往少。|养蜂人手册
extrabees.species.stone.desc=它们的蜂巢一部分以石头打造,并且消耗的蜡也比以往少。|养蜂员手册
extrabees.species.granite.name=坚毅
extrabees.species.granite.desc=获得了于岩石中打洞的能力后,它们和隐藏于石头之中的矿物质有了令人惊异的密切关系。|养蜂人手册
extrabees.species.granite.desc=获得了于岩石中打洞的能力后,它们和隐藏于石头之中的矿物质有了令人惊异的密切关系。|养蜂员手册
extrabees.species.mineral.name=弹性
extrabees.species.mineral.desc=起源于岩缝中的蜜蜂,它们的后代已经开始进化出以矿物质作为食粮的基因。|养蜂人手册
extrabees.species.mineral.desc=起源于岩缝中的蜜蜂,它们的后代已经开始进化出以矿物质作为食粮的基因。|养蜂员手册
extrabees.species.copper.name=铜绿
extrabees.species.copper.desc=它们因啃咬墙壁中的铜线缆造成的供电问题而声名狼藉。|养蜂人手册
extrabees.species.copper.desc=它们因啃咬墙壁中的铜线缆造成的供电问题而声名狼藉。|养蜂员手册
extrabees.species.tin.name=锡灰
extrabees.species.tin.desc=它们的身体被金属所覆盖,它们还用这种金属打造它们的蜂巢。|养蜂人手册
extrabees.species.tin.desc=它们的身体被金属所覆盖,它们还用这种金属打造它们的蜂巢。|养蜂员手册
extrabees.species.iron.name=铁锈
extrabees.species.iron.desc=哦,锈掉的蜜蜂诶。我是不是要去打针破伤风疫苗?|Jadedcat,养蜂人
extrabees.species.iron.desc=哦,锈掉的蜜蜂诶。我是不是要去打针破伤风疫苗?|Jadedcat,养蜂员
extrabees.species.lead.name=铅质
extrabees.species.lead.desc=“用它应该很容易实现炼金术!”|Pahimar,炼金术士
extrabees.species.zinc.name=镀锌
@@ -338,7 +338,7 @@ extrabees.species.gold.name=金闪
extrabees.species.silver.name=银辉
extrabees.species.electrum.name=琥珀金
extrabees.species.platinum.name=铂金
extrabees.species.platinum.desc=喔喔,看这个闪光的蜜蜂。|Jadedcat,养蜂人
extrabees.species.platinum.desc=喔喔,看这个闪光的蜜蜂。|Jadedcat,养蜂员
extrabees.species.lapis.name=青金石
extrabees.species.sodalite.name=方钠
extrabees.species.pyrite.name=黄铁
@@ -346,12 +346,12 @@ extrabees.species.bauxite.name=铝土
extrabees.species.cinnabar.name=朱砂
extrabees.species.sphalerite.name=闪锌
extrabees.species.emerald.name=绿宝石
extrabees.species.emerald.desc=看这个蜜蜂!它甚至亮瞎了我的眼睛!|Jadedcat,养蜂人
extrabees.species.emerald.desc=看这个蜜蜂!它甚至亮瞎了我的眼睛!|Jadedcat,养蜂员
extrabees.species.ruby.name=红宝石
extrabees.species.sapphire.name=蓝宝石
extrabees.species.olivine.name=橄榄石
extrabees.species.diamond.name=钻石
extrabees.species.diamond.desc=我的天,这绝对是我见过的最闪亮的蜜蜂!|Jadedcat,养蜂人
extrabees.species.diamond.desc=我的天,这绝对是我见过的最闪亮的蜜蜂!|Jadedcat,养蜂员
extrabees.species.unstable.name=不稳
extrabees.species.nuclear.name=核能
extrabees.species.radioactive.name=辐射
@@ -379,7 +379,7 @@ extrabees.species.sugar.name=含糖
extrabees.species.ripening.name=成熟
extrabees.species.fruit.name=水果
extrabees.species.alcohol.name=发酵
extrabees.species.alcohol.desc=回家吧蜜蜂们,你们早喝多了。|Jadedcat, 养蜂人
extrabees.species.alcohol.desc=回家吧蜜蜂们,你们早喝多了。|Jadedcat, 养蜂员
extrabees.species.farm.name=农庄
extrabees.species.milk.name=牛奶
extrabees.species.milk.desc=“哞哞。嗯…… 我是说,Bzzz。”|一只困惑的蜜蜂
@@ -391,11 +391,11 @@ extrabees.species.swamp.name=潮湿
extrabees.species.boggy.name=泥淖
extrabees.species.fungal.name=菌类
extrabees.species.basalt.name=激怒
extrabees.species.basalt.desc=它们的祖先到达下界的方式仍不得而知,但下界早已使得它们变得富有攻击性。|养蜂人手册
extrabees.species.basalt.desc=它们的祖先到达下界的方式仍不得而知,但下界早已使得它们变得富有攻击性。|养蜂员手册
extrabees.species.tempered.name=愤怒
extrabees.species.tempered.desc=一次不寻常的突变激活了这只蜜蜂身上更高级别的愤怒的隐性基因。|养蜂人手册
extrabees.species.tempered.desc=一次不寻常的突变激活了这只蜜蜂身上更高级别的愤怒的隐性基因。|养蜂员手册
extrabees.species.volcanic.name=火山
extrabees.species.volcanic.desc=在进化的历程中,它们似乎在什么地方获得了烈焰人的特征。|养蜂人手册
extrabees.species.volcanic.desc=在进化的历程中,它们似乎在什么地方获得了烈焰人的特征。|养蜂员手册
extrabees.species.malicious.name=恶意
extrabees.species.infectious.name=传染
extrabees.species.virulent.name=剧毒
@@ -406,24 +406,24 @@ extrabees.species.corrosive.name=腐蚀
extrabees.species.caustic.name=苛性
extrabees.species.acidic.name=酸化
extrabees.species.excited.name=激动
extrabees.species.excited.desc=红石,作为它们额外的能量源,而存在。|养蜂人手册
extrabees.species.excited.desc=红石,作为它们额外的能量源,而存在。|养蜂员手册
extrabees.species.energetic.name=活力十足
extrabees.species.energetic.desc=我的天,搞什么鬼!房子失火了!房子失火了!|Generikb,恐慌的养蜂人
extrabees.species.energetic.desc=我的天,搞什么鬼!房子失火了!房子失火了!|Generikb,恐慌的养蜂员
extrabees.species.ecstatic.name=狂喜
extrabees.species.ecstatic.desc=在从红石里汲取了过量的电力后,它们可以产生充满了能量的电弧。请务必做好防范措施,或许一根避雷针就好。|养蜂人手册
extrabees.species.ecstatic.desc=在从红石里汲取了过量的电力后,它们可以产生充满了能量的电弧。请务必做好防范措施,或许一根避雷针就好。|养蜂员手册
extrabees.species.artic.name=冻结
extrabees.species.freezing.name=冰封
extrabees.species.shadow.name=阴影
extrabees.species.darkened.name=黑暗
extrabees.species.abyss.name=深渊
extrabees.species.red.name=红色
extrabees.species.red.desc=不要被它们蜇了,否则你眼前将尽是红色的世界。|养蜂人手册
extrabees.species.red.desc=不要被它们蜇了,否则你眼前将尽是红色的世界。|养蜂员手册
extrabees.species.yellow.name=黄色
extrabees.species.yellow.desc=它们正尝试用蜂蜜来染出你闪光的新一天。|养蜂人手册
extrabees.species.yellow.desc=它们正尝试用蜂蜜来染出你闪光的新一天。|养蜂员手册
extrabees.species.blue.name=蓝色
extrabees.species.blue.desc=“加油吧我的蜜蜂。你看上去开始有点泛蓝了。”|神秘的养蜂人
extrabees.species.blue.desc=“加油吧我的蜜蜂。你看上去开始有点泛蓝了。”|神秘的养蜂员
extrabees.species.green.name=绿色
extrabees.species.green.desc=或许这是一种对于保护色的尝试,然而这些蜜蜂已经开始生产颜色接近树叶或草的颜色的蜂巢了。|养蜂人手册
extrabees.species.green.desc=或许这是一种对于保护色的尝试,然而这些蜜蜂已经开始生产颜色接近树叶或草的颜色的蜂巢了。|养蜂员手册
extrabees.species.black.name=黑色
extrabees.species.white.name=白色
extrabees.species.brown.name=棕色
@@ -439,6 +439,8 @@ extrabees.species.lightgray.name=淡灰
extrabees.species.celebratory.name=普天同庆
extrabees.species.jaded.name=翡翠
extrabees.species.jaded.desc=我培养出了所有蜜蜂,最后却只得到了点带血色的紫色染料!|Jaded,被 Sengir 选中之人
extrabees.species.chad.name=纸屑
extrabees.species.chad.desc=GTNH蜜蜂:最好的东西.
extrabees.species.glowstone.name=怒视
extrabees.species.hazardous.name=冒险
extrabees.species.nickel.name=含镍
@@ -513,4 +515,4 @@ extrabees.gui.database.tab.species.further=次代突变
extrabees.gui.database.tab.branches.overview=概述
extrabees.gui.database.tab.branches.species=种
extrabees.gui.database.tab.breeder=杂交路线
extrabees.gui.database.tab.breeder=杂交路线
@@ -158,12 +158,12 @@ extratrees.block.tooltip.twoMaterials=%s - %s
< %1$s is name of wood used for door >
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.type.standard=
extratrees.block.door.type.solid=Solid
extratrees.block.door.type.double=Split
extratrees.block.door.type.full=Full
extratrees.block.door.type.solid=坚固
extratrees.block.door.type.double=分离
extratrees.block.door.type.full=完整
< %1$s is name of the wood>
extratrees.block.plank.name=%1$s木板
@@ -173,7 +173,7 @@ extratrees.block.woodstairs.name=%1$s楼梯
extratrees.block.woodfence.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 门
< %3$s is the name of the second wood >
extratrees.block.multifence.name2=%2$s %1$s & $3$s 门
@@ -269,7 +269,7 @@ extratrees.species.raspberry.name=树莓
extratrees.species.blueberry.name=蓝莓
extratrees.species.cranberry.name=蔓越莓
extratrees.species.juniper.name=杜松子
extratrees.species.gooseberry.name=鹅莓
extratrees.species.gooseberry.name=醋栗
extratrees.species.goldenraspberry.name=金树莓
extratrees.species.cinnamon.name=肉桂
extratrees.species.coconut.name=椰子
@@ -359,6 +359,7 @@ for.extratrees.item.food.elderberry=接骨木浆果
for.extratrees.item.food.olive=橄榄
for.extratrees.item.food.gingkonut=白果
for.extratrees.item.food.coffee=咖啡
for.extratrees.item.food.osangeosange=桑橙
for.extratrees.item.food.osangeorange=桑橙
for.extratrees.item.food.clove=丁香
for.extratrees.item.food.papayimar=Pahimar牌木瓜
@@ -369,7 +370,7 @@ for.extratrees.item.food.raspberry=树莓
for.extratrees.item.food.blueberry=蓝莓
for.extratrees.item.food.cranberry=蔓越莓
for.extratrees.item.food.juniper=杜松子
for.extratrees.item.food.gooseberry=鹅莓
for.extratrees.item.food.gooseberry=醋栗
for.extratrees.item.food.goldenraspberry=金树莓
for.extratrees.item.food.coconut=椰子
for.extratrees.item.food.cashew=腰果
@@ -434,3 +435,6 @@ extratrees.gui.database.tab.butterfly.breeder=杂交路线
extratrees.gui.database.log=原木
extratrees.gui.database.leaves=树叶
binniecore.beemodifier.genetic_decay=基因衰变
@@ -50,7 +50,7 @@ genetics.sequence.fully=Fully Sequenced
genetics.sequence.partially=Partially Sequenced (%d%%)
genetics.machine.machine.isolator=Isolator
genetics.machine.machine.isolator.info=The Isolator takes a random allele from a bee, tree or other individual and copies it into an empty sequence vial. This requires the use of ethanol as a solvent and an enzyme to cut up the DNA. The unsequenced serums can then be amplified in a Polymeriser and sequenced in a Sequencer.
genetics.machine.machine.isolator.info=The Isolator takes a random allele from a bee, tree or other individual and copies it into an empty sequence vial. This requires the use of ethanol as a solvent and an enzyme to cut up the DNA. The unsequenced serums can then be amplified in a Polymeriser and sequenced in a Sequencer. This process has a small chance to destroy the individual.
genetics.machine.isolator.error.noIndividual=No individual to isolate
genetics.machine.isolator.error.noRoom=No room for DNA sequences
genetics.machine.isolator.error.noVials=No empty sequencer vials
@@ -122,7 +122,7 @@ genetics.machine.incubator.error.noLiquid=Not enough incubation liquid
genetics.machine.incubator.error.noRoom=No room for output
genetics.machine.labMachine.acclimatiser=Acclimatiser
genetics.machine.labMachine.acclimatiser.info=The Acclimatiser uses acclimatizing items to adjust the temperature and humidity tolerance of individuals.
genetics.machine.labMachine.acclimatiser.info=The Acclimatiser uses acclimatizing items to adjust the temperature and humidity tolerance of individuals. This process has only a small chance to succeed.
genetics.machine.acclimatiser.acclimatizingItems=Acclimatizing Items
genetics.machine.acclimatiser.error.noIndividual=No Individual to Acclimatise
genetics.machine.acclimatiser.error.noAcclimatizingItems=No Acclimatising Items
@@ -50,7 +50,7 @@ genetics.sequence.fully=已测序
genetics.sequence.partially=测序 %d%%
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.noRoom=没有空间
genetics.machine.isolator.error.noVials=没有空白序列
@@ -105,7 +105,7 @@ genetics.machine.genepool.error.insufficientEnzyme=酶不足
genetics.machine.labMachine.labMachine=实验台
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.unanalysedItem=未经分析的物品
genetics.machine.analyser.error.alreadyAnalysed.title=已经过分析
@@ -122,7 +122,7 @@ genetics.machine.incubator.error.noLiquid=液体不足
genetics.machine.incubator.error.noRoom=输出槽已满
genetics.machine.labMachine.acclimatiser=适应性调整器
genetics.machine.labMachine.acclimatiser.info=适应性调整器使用适应性调整物品来调整个体的温度和湿度适应性。
genetics.machine.labMachine.acclimatiser.info=适应性调整器使用适应性调整物品,来调整个体的温度和湿度适应性。此过程只有小概率成功。
genetics.machine.acclimatiser.acclimatizingItems=适应性调整物品
genetics.machine.acclimatiser.error.noIndividual=没有可供调整适应性的个体
genetics.machine.acclimatiser.error.noAcclimatizingItems=没有适应性调整物品
@@ -266,3 +266,12 @@ genetics.gui.analyst.wood.flammable=可燃
genetics.gui.analyst.wood.logs=原木
genetics.gui.analyst.wood.products=精加工产物
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=打开数据库并拿起一个空血清瓶. 点击已测序的血清以应用.
+6 -6
View File
@@ -11,8 +11,8 @@
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
"logoFile": "/assets/binniecore/logo.png",
"parent": "",
"requiredMods": [ "Forestry" ],
"dependencies": [ "Forestry" ],
"requiredMods": [ "Forestry", "gtnhlib@[0.0.10,)" ],
"dependencies": [ "Forestry", "gtnhlib@[0.0.10,)" ],
"dependants" : [ ],
"useDependencyInformation" : true
},
@@ -27,7 +27,7 @@
"authorList": [ "Binnie" ],
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
"logoFile": "/assets/extrabees/logo.png",
"parent": "",
"parent": "${modId}",
"dependencies": [ "BinnieCore" ]
},
{
@@ -41,7 +41,7 @@
"authorList": [ "Binnie" ],
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
"logoFile": "/assets/extratrees/logo.png",
"parent": "",
"parent": "${modId}",
"dependencies": [ "BinnieCore" ]
},
{
@@ -55,7 +55,7 @@
"authorList": [ "Binnie" ],
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
"logoFile": "/assets/botany/logo.png",
"parent": "",
"parent": "${modId}",
"dependencies": [ "BinnieCore" ]
},
{
@@ -69,7 +69,7 @@
"authorList": [ "Binnie" ],
"credits": "Thanks to Sengir, MysteriousAges, Xizzzy and many others",
"logoFile": "/assets/genetics/logo.png",
"parent": "",
"parent": "${modId}",
"dependencies": [ "BinnieCore" ]
}
]