Compare commits

...
24 Commits
Author SHA1 Message Date
miozune 9b73b94d16 Fix meta id for MAX Bio Lab (#338) 2023-01-28 17:24:57 +01:00
Raven Szewczyk e133afc774 Fix jar resource loading on newer Java versions (still works on 8) (#337) 2023-01-25 20:50:48 +01:00
asdflj 75ff631f16 bookmark item stack size readable conversion (#335) 2023-01-23 10:59:29 +01:00
Raven Szewczyk 6f5d45c4ea Update CodeChicken dependencies (#330) 2023-01-05 12:18:21 +00:00
miozune fb51475bb9 Fix stack size of permutations on PositionedStack (#327) 2022-12-26 19:14:45 +01:00
Jason Mitchell 99ec3a4204 Add cf & modrinth deps (#325)
* Add cf & modrinth deps

* rm jitpack

* Spotless, you are annoying sometimes
2022-12-22 20:58:39 +01:00
miozune 8c4d609e4c Expose some members in GuiContainerManager (#324) 2022-12-21 10:37:43 +01:00
miozune 336c7dc621 Fix inventory desync when closing GuiRecipe (#320) 2022-11-29 18:21:45 +01:00
Yang Xizhi 2130a47f6f fix overlap of ? button (#321) 2022-11-29 11:19:42 +01:00
miozune 73b492b0e3 Add Dangote Distillus to catalyst for distillery (#319) 2022-11-18 07:33:16 +01:00
miozune efa69f31b6 Fix incorrect RecipeCatalysts for naquadah generators (#318) 2022-11-08 07:38:28 +01:00
makamys 95b437e5c9 Only mark item list as dirty if it's actually modified (#316)
Fixes #315
2022-10-23 11:53:29 +02:00
miozune afe3c54c29 Add config to not optimize computation for GUI overlap (#314) 2022-10-17 20:59:14 +02:00
Jason MitchellandGitHub GTNH Actions 2cab09e91b Try/Catch AIOBE - maybe fixes #295 (#312)
* Try/Catch AIOBE - maybe fixes #295

* spotlessApply

Co-authored-by: GitHub GTNH Actions <unknown>
2022-10-17 11:34:06 +02:00
Jason Mitchell 4b4ab434c0 Update buildscript and add CF/Modrinth project IDs 2022-10-15 08:20:59 -07:00
Yang Xizhi 9d108b21f9 fix missing yShift (#309) 2022-10-15 15:40:52 +02:00
slprimeandslprime 2302dac5c0 Bookmarks: save result that has output bigger than 64 (#308)
Co-authored-by: slprime <[email protected]>
2022-10-13 20:49:43 +02:00
slprimeandslprime 7c2fb2df5f fix bookmarks (#307)
Co-authored-by: slprime <[email protected]>
2022-10-13 10:06:08 +02:00
miozune 14aa3728ca Add AE2 Stuff Inscriber to RecipeCatalyst (#306) 2022-10-13 08:50:04 +02:00
Kiwi 66fc2270dd Update zh_CN.lang (#301) 2022-09-24 12:25:39 +02:00
miozune 138d25dbfd Fix incorrect color applied to GuiRecipeCatalyst (#300) 2022-09-19 05:58:46 +02:00
Raven Szewczyk d9191750a7 Update CodeChickenLib (#299) 2022-09-18 23:15:42 +02:00
くぁーりぃ 6d9ec0c0da Backport some of REI bookmark features (#296)
* add placeholder bookmark drop

* add item panel to bookmark panel injection support

* fix outofboundsexception

* fix drag'n drop voids bookmark

* add itemstack moving animation

* implement pop animation

* fix crashes

* disable ItemPanel Animation

* disable pop animation on bookmark load

* spotlessapply

* disable move animation on gui scale

* add config option
2022-09-18 12:08:16 +02:00
くぁーりぃ 617ac0600d Add search history (#294)
* add search history

* spotlessApply

* linkedlist->arraylist
2022-09-10 18:35:48 +02:00
31 changed files with 877 additions and 240 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
+321 -136
View File
@@ -1,13 +1,17 @@
//version: 1660899027
//version: 1671313514
/*
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.
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
@@ -26,6 +30,11 @@ buildscript {
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/'
@@ -34,13 +43,11 @@ 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 {
@@ -49,17 +56,22 @@ plugins {
id 'eclipse'
id 'scala'
id 'maven-publish'
id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false
id 'org.jetbrains.kotlin.kapt' version '1.5.30' apply false
id 'com.google.devtools.ksp' version '1.5.30-1.0.0' apply false
id 'org.ajoberstar.grgit' version '4.1.1'
id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false
id 'org.jetbrains.kotlin.kapt' version '1.5.30' apply false
id 'com.google.devtools.ksp' version '1.5.30-1.0.0' apply false
id 'org.ajoberstar.grgit' version '4.1.1'
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'com.palantir.git-version' version '0.13.0' apply false
id 'de.undercouch.download' version '5.0.1'
id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false
id 'com.diffplug.spotless' version '6.7.2' apply false
id 'com.palantir.git-version' version '0.13.0' apply false
id 'de.undercouch.download' version '5.0.1'
id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false
id 'com.diffplug.spotless' version '6.7.2' apply false
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
}
verifySettingsGradle()
boolean settingsupdated = verifySettingsGradle()
settingsupdated = verifyGitAttributes() || settingsupdated
if (settingsupdated)
throw new GradleException("Settings has been updated, please re-run task.")
dependencies {
implementation 'com.diffplug:blowdryer:1.6.0'
@@ -98,7 +110,7 @@ if (!disableSpotless) {
apply from: Blowdryer.file('spotless.gradle')
}
if(JavaVersion.current() != JavaVersion.VERSION_1_8) {
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current())
}
@@ -123,65 +135,79 @@ checkPropertyExists("containsMixinsAndOrCoreModOnly")
checkPropertyExists("usesShadowedDependencies")
checkPropertyExists("developmentEnvironmentUserName")
boolean noPublishedSources = project.hasProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false
boolean usesMixinDebug = project.hasProperty('usesMixinDebug') ?: project.usesMixins.toBoolean()
boolean forceEnableMixins = project.hasProperty('forceEnableMixins') ? project.forceEnableMixins.toBoolean() : false
String channel = project.hasProperty('channel') ? project.channel : 'stable'
String mappingsVersion = project.hasProperty('mappingsVersion') ? project.mappingsVersion : '12'
propertyDefaultIfUnset("noPublishedSources", false)
propertyDefaultIfUnset("usesMixinDebug", project.usesMixins)
propertyDefaultIfUnset("forceEnableMixins", false)
propertyDefaultIfUnset("channel", "stable")
propertyDefaultIfUnset("mappingsVersion", "12")
propertyDefaultIfUnset("modrinthProjectId", "")
propertyDefaultIfUnset("modrinthRelations", "")
propertyDefaultIfUnset("curseForgeProjectId", "")
propertyDefaultIfUnset("curseForgeRelations", "")
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)
}
}
@@ -222,22 +248,21 @@ 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() || forceEnableMixins) {
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
arguments += [
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
]
@@ -255,17 +280,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
}
}
@@ -274,7 +301,7 @@ minecraft {
args(arguments)
jvmArgs(jvmArguments)
if(developmentEnvironmentUserName) {
if (developmentEnvironmentUserName) {
args("--username", developmentEnvironmentUserName)
}
}
@@ -285,7 +312,7 @@ minecraft {
}
}
if(file('addon.gradle').exists()) {
if (file('addon.gradle').exists()) {
apply from: 'addon.gradle'
}
@@ -302,35 +329,32 @@ repositories {
name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/'
}
if(usesMixins.toBoolean() || forceEnableMixins) {
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')
}
if(usesMixins.toBoolean() || forceEnableMixins) {
// using 0.8 to workaround a issue in 0.7 which fails mixin application
compile('com.github.GTNewHorizons:SpongePoweredMixin:0.7.12-GTNH') {
// Mixin includes a lot of dependencies that are too up-to-date
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()) {
runtimeOnly('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')
}
}
@@ -342,13 +366,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",
@@ -396,20 +425,20 @@ jar {
attributes(getManifestAttributes())
}
if(usesShadowedDependencies.toBoolean()) {
if (usesShadowedDependencies.toBoolean()) {
dependsOn(shadowJar)
enabled = false
}
}
reobf {
if(usesMixins.toBoolean() && file(mixinSrg).exists()) {
if (usesMixins.toBoolean()) {
addExtraSrgFile mixinSrg
}
}
afterEvaluate {
if(usesMixins.toBoolean()) {
if (usesMixins.toBoolean()) {
tasks.compileJava {
options.compilerArgs += [
"-AreobfSrgFile=${tasks.reobf.srg}",
@@ -424,7 +453,7 @@ afterEvaluate {
}
runClient {
if(developmentEnvironmentUserName) {
if (developmentEnvironmentUserName) {
arguments += [
"--username",
developmentEnvironmentUserName
@@ -465,7 +494,7 @@ processResources {
"modName": modName
}
if(usesMixins.toBoolean()) {
if (usesMixins.toBoolean()) {
from refMap
}
@@ -478,31 +507,31 @@ processResources {
def getManifestAttributes() {
def manifestAttributes = [:]
if(!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) {
if (!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) {
manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
}
if(accessTransformersFile) {
manifestAttributes += ["FMLAT" : accessTransformersFile.toString()]
if (accessTransformersFile) {
manifestAttributes += ["FMLAT": accessTransformersFile.toString()]
}
if(coreModClass) {
if (coreModClass) {
manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass]
}
if(usesMixins.toBoolean()) {
if (usesMixins.toBoolean()) {
manifestAttributes += [
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
"MixinConfigs" : "mixins." + modId + ".json",
"ForceLoadAsMod" : !containsMixinsAndOrCoreModOnly.toBoolean()
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
"MixinConfigs" : "mixins." + modId + ".json",
"ForceLoadAsMod": !containsMixinsAndOrCoreModOnly.toBoolean()
]
}
return manifestAttributes
}
task sourcesJar(type: Jar) {
from (sourceSets.main.allSource)
from (file("$projectDir/LICENSE"))
from(sourceSets.main.allSource)
from(file("$projectDir/LICENSE"))
getArchiveClassifier().set('sources')
}
@@ -552,22 +581,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")
}
@@ -575,11 +604,11 @@ task apiJar(type: Jar) {
}
artifacts {
if(!noPublishedSources) {
if (!noPublishedSources) {
archives sourcesJar
}
archives devJar
if(apiPackage) {
if (apiPackage) {
archives apiJar
}
}
@@ -597,10 +626,10 @@ publishing {
publications {
maven(MavenPublication) {
from components.java
if(usesShadowedDependencies.toBoolean()) {
if (usesShadowedDependencies.toBoolean()) {
artifact source: shadowJar, classifier: ""
}
if(!noPublishedSources) {
if (!noPublishedSources) {
artifact source: sourcesJar, classifier: "sources"
}
artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev"
@@ -615,7 +644,7 @@ publishing {
// remove extra garbage from minecraft and minecraftDeps configuration
pom.withXml {
def badArtifacts = [:].withDefault {[] as Set<String>}
def badArtifacts = [:].withDefault { [] as Set<String> }
for (configuration in [
projectConfigs.minecraft,
projectConfigs.minecraftDeps
@@ -648,6 +677,124 @@ 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 {
@@ -666,20 +813,40 @@ if (!project.getGradle().startParameter.isOffline() && isNewBuildScriptVersionAv
}
static URL availableBuildScriptUrl() {
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/main/build.gradle")
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/build.gradle")
}
static URL exampleSettingsGradleUrl() {
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/main/settings.gradle.example")
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/settings.gradle.example")
}
static URL exampleGitAttributesUrl() {
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/.gitattributes")
}
def verifySettingsGradle() {
boolean verifyGitAttributes() {
def gitattributesFile = getFile(".gitattributes")
if (!gitattributesFile.exists()) {
println("Downloading default .gitattributes")
exampleGitAttributesUrl().withInputStream { i -> gitattributesFile.withOutputStream { it << i } }
exec {
workingDir '.'
commandLine 'git', 'add', '--renormalize', '.'
}
return true
}
return false
}
boolean verifySettingsGradle() {
def settingsFile = getFile("settings.gradle")
if (!settingsFile.exists()) {
println("Downloading default settings.gradle")
exampleSettingsGradleUrl().withInputStream { i -> settingsFile.withOutputStream { it << i } }
throw new GradleException("Settings.gradle has been updated, please re-run task.")
return true
}
return false
}
boolean performBuildScriptUpdate(String projectDir) {
@@ -687,7 +854,10 @@ boolean performBuildScriptUpdate(String projectDir) {
def buildscriptFile = getFile("build.gradle")
availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } }
out.style(Style.Success).print("Build script updated. Please REIMPORT the project or RESTART your IDE!")
verifySettingsGradle()
boolean settingsupdated = verifySettingsGradle()
settingsupdated = verifyGitAttributes() || settingsupdated
if (settingsupdated)
throw new GradleException("Settings has been updated, please re-run task.")
return true
}
return false
@@ -707,7 +877,7 @@ boolean isNewBuildScriptVersionAvailable(String projectDir) {
static String getVersionHash(String buildScriptContent) {
String versionLine = buildScriptContent.find("^//version: [a-z0-9]*")
if(versionLine != null) {
if (versionLine != null) {
return versionLine.split(": ").last()
}
return ""
@@ -733,16 +903,16 @@ task deobfParams {
overwrite false
}
if(!file(paramsCSV).exists()) {
if (!file(paramsCSV).exists()) {
println("Extracting MCP archive ...")
unzip(mcpZIP, mcpDir)
}
println("Parsing params.csv ...")
Map<String, String> params = new HashMap<>()
Files.lines(Paths.get(paramsCSV)).forEach{line ->
Files.lines(Paths.get(paramsCSV)).forEach { line ->
String[] cells = line.split(",")
if(cells.length > 2 && cells[0].matches("p_i?\\d+_\\d+_")) {
if (cells.length > 2 && cells[0].matches("p_i?\\d+_\\d+_")) {
params.put(cells[0], cells[1])
}
}
@@ -755,8 +925,8 @@ task deobfParams {
static int replaceParams(File file, Map<String, String> params) {
int fileCount = 0
if(file.isDirectory()) {
for(File f : file.listFiles()) {
if (file.isDirectory()) {
for (File f : file.listFiles()) {
fileCount += replaceParams(f, params)
}
return fileCount
@@ -765,14 +935,14 @@ println("Visiting ${file.getName()} ...")
try {
String content = new String(Files.readAllBytes(file.toPath()))
int hash = content.hashCode()
params.forEach{key, value ->
params.forEach { key, value ->
content = content.replaceAll(key, value)
}
if(hash != content.hashCode()) {
if (hash != content.hashCode()) {
Files.write(file.toPath(), content.getBytes("UTF-8"))
return 1
}
} catch(Exception e) {
} catch (Exception e) {
e.printStackTrace()
}
return 0
@@ -823,16 +993,16 @@ try {
//get rid of directories:
int lastSlash = fileName.lastIndexOf("/")
if(lastSlash > 0) {
if (lastSlash > 0) {
fileName = fileName.substring(lastSlash + 1)
}
//get rid of extension:
if(fileName.endsWith(".jar") || fileName.endsWith(".litemod")) {
if (fileName.endsWith(".jar") || fileName.endsWith(".litemod")) {
fileName = fileName.substring(0, fileName.lastIndexOf("."))
}
String hostName = url.getHost()
if(hostName.startsWith("www.")) {
if (hostName.startsWith("www.")) {
hostName = hostName.substring(4)
}
List parts = Arrays.asList(hostName.split("\\."))
@@ -840,7 +1010,7 @@ try {
hostName = String.join(".", parts)
return deobf(sourceURL, "$hostName/$fileName")
} catch(Exception e) {
} catch (Exception e) {
return deobf(sourceURL, "deobf/${sourceURL.hashCode()}")
}
}
@@ -855,13 +1025,13 @@ String bon2File = "$bon2Dir/BON2-${bon2Version}.jar"
String obfFile = "$cacheDir/modules-2/files-2.1/${fileName}.jar"
String deobfFile = "$cacheDir/modules-2/files-2.1/${fileName}-deobf.jar"
if(file(deobfFile).exists()) {
if (file(deobfFile).exists()) {
return files(deobfFile)
}
String mappingsVer
String remoteMappings = project.hasProperty('remoteMappings') ? project.remoteMappings : 'https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/'
if(remoteMappings) {
if (remoteMappings) {
String id = "${forgeVersion.split("\\.")[3]}-$minecraftVersion"
String mappingsZIP = "$cacheDir/forge_gradle/maven_downloader/de/oceanlabs/mcp/mcp_snapshot_nodoc/$id/mcp_snapshot_nodoc-${id}.zip"
@@ -897,7 +1067,7 @@ return files(deobfFile)
def zipMappings(String zipPath, String url, String bon2Dir) {
File zipFile = new File(zipPath)
if(zipFile.exists()) {
if (zipFile.exists()) {
return
}
@@ -937,6 +1107,21 @@ if (!project.hasProperty(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
}
+2 -2
View File
@@ -1,7 +1,7 @@
// Add your dependencies here
dependencies {
compile('com.github.GTNewHorizons:CodeChickenLib:1.1.5.3:dev')
compile('com.github.GTNewHorizons:CodeChickenCore:1.1.3:dev')
compile('com.github.GTNewHorizons:CodeChickenLib:1.1.5.6:dev')
compile('com.github.GTNewHorizons:CodeChickenCore:1.1.7:dev')
shadowImplementation('org.apache.commons:commons-csv:1.8')
}
+30
View File
@@ -58,3 +58,33 @@ containsMixinsAndOrCoreModOnly = true
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies = true
# 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 = 358228
# 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 id of the other mod.
curseForgeRelations = requiredDependency:codechickencore-unofficial;requiredDependency:codechickenlib-unofficial
# 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 = notenoughitems-unofficial
# 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.
modrinthRelations = required-project:codechickenlib-unofficial;required-project:codechickencore-unofficial
-3
View File
@@ -12,7 +12,4 @@ repositories {
includeGroup 'curse.maven'
}
}
maven {
url 'https://jitpack.io'
}
}
@@ -11,6 +11,7 @@ import codechicken.nei.guihook.GuiContainerManager;
import codechicken.nei.recipe.BookmarkRecipeId;
import codechicken.nei.recipe.StackInfo;
import codechicken.nei.util.NBTJson;
import codechicken.nei.util.ReadableNumberConverter;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonPrimitive;
@@ -23,10 +24,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import javax.annotation.Nullable;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.inventory.GuiContainer;
@@ -68,10 +66,13 @@ public class BookmarkPanel extends PanelWidget {
TODO_LIST
}
protected static class BookmarkGrid extends ItemsGrid {
public static class BookmarkGrid extends ItemsGrid {
protected static final float SCALE_SPEED = 0.1f;
protected List<List<Integer>> gridMask;
protected List<BookmarkStackMeta> metadata = new ArrayList<>();
protected WeakHashMap<ItemStack, Float> animation = new WeakHashMap<>();
protected BookmarkViewMode viewMode = BookmarkViewMode.DEFAULT;
protected boolean[] todoSpaces;
@@ -207,7 +208,7 @@ public class BookmarkPanel extends PanelWidget {
final BookmarkStackMeta meta = getMetadata(idx);
if ((recipeId == null && meta.recipeId == null
|| recipeId != null && meta.recipeId != null && recipeId.equals(meta.recipeId))
&& StackInfo.equalItemAndNBT(stackA, realItems.get(idx), useNBT)) {
&& StackInfo.equalItemAndNBT(stackA, getItem(idx), useNBT)) {
return idx;
}
}
@@ -220,8 +221,17 @@ public class BookmarkPanel extends PanelWidget {
}
public void addItem(ItemStack stackA, BookmarkStackMeta meta) {
addItem(stackA, meta, true);
}
public void addItem(ItemStack stackA, BookmarkStackMeta meta, boolean animate) {
realItems.add(stackA);
metadata.add(meta);
if (animate && !NEIClientConfig.shouldCacheItemRendering() && NEIClientConfig.areBookmarksAnimated()) {
animation.put(stackA, 0f);
}
onGridChanged();
}
@@ -253,6 +263,7 @@ public class BookmarkPanel extends PanelWidget {
}
protected boolean removeItem(int idx) {
animation.remove(getItem(idx));
realItems.remove(idx);
metadata.remove(idx);
onGridChanged();
@@ -317,20 +328,35 @@ public class BookmarkPanel extends PanelWidget {
|| LayoutManager.bookmarkPanel.sortedStackIndex != idx) {
final ItemStack stack = getItem(idx);
final BookmarkStackMeta meta = getMetadata(idx);
GuiContainerManager.drawItem(
rect.x + 1,
rect.y + 1,
stack,
true,
meta.factor < 0 || meta.fluidDisplay ? "" : String.valueOf(stack.stackSize));
if (meta.recipeId != null && !meta.ingredient && NEIClientConfig.showRecipeMarker()) {
drawRecipeMarker(rect.x, rect.y, GuiContainerManager.getFontRenderer(stack));
final String stackSize = meta.factor < 0 || meta.fluidDisplay
? ""
: ReadableNumberConverter.INSTANCE.toWideReadableForm(stack.stackSize);
if (animation.containsKey(stack) && animation.get(stack) < 1) {
final float currentScale = animation.get(stack) + SCALE_SPEED;
animation.put(stack, currentScale);
drawPoppingItem(rect, stack, stackSize, currentScale);
} else {
GuiContainerManager.drawItem(rect.x + 1, rect.y + 1, stack, true, stackSize);
if (meta.recipeId != null && !meta.ingredient && NEIClientConfig.showRecipeMarker()) {
drawRecipeMarker(rect.x, rect.y, GuiContainerManager.getFontRenderer(stack));
}
}
}
}
protected void drawPoppingItem(Rectangle4i rect, ItemStack stack, String stackSize, float currentScale) {
GL11.glScalef(currentScale, currentScale, currentScale); // push & pop matrix crashes the game
GuiContainerManager.drawItem(
Math.round((rect.x + 1 + (SLOT_SIZE / 2 - currentScale * SLOT_SIZE / 2)) / currentScale),
Math.round((rect.y + 1 + (SLOT_SIZE / 2 - currentScale * SLOT_SIZE / 2)) / currentScale),
stack,
true,
stackSize);
GL11.glScalef(1 / currentScale, 1 / currentScale, 1 / currentScale);
}
protected void drawRecipeMarker(int offsetX, int offsetY, FontRenderer fontRenderer) {
final float scaleFactor = fontRenderer.getUnicodeFlag() ? 0.85f : 0.5f;
final float inverseScaleFactor = 1.0f / scaleFactor;
@@ -403,6 +429,23 @@ public class BookmarkPanel extends PanelWidget {
return String.format("(%d/%d) [%d]", getPage(), Math.max(1, getNumPages()), size);
}
public void addItem(ItemStack itemStack) {
addItem(itemStack, true);
}
public void addItem(ItemStack itemStack, boolean saveStackSize) {
final BookmarkGrid BGrid = (BookmarkGrid) grid;
int idx = BGrid.indexOf(itemStack, true);
if (idx != -1) {
BGrid.removeItem(idx);
}
addOrRemoveItem(itemStack, null, null, false, saveStackSize);
}
public int getNameSpaceSize() {
return namespaces.size();
}
public void addOrRemoveItem(ItemStack stackA) {
addOrRemoveItem(stackA, null, null, false, false);
}
@@ -488,7 +531,7 @@ public class BookmarkPanel extends PanelWidget {
BookmarkRecipeId recipeId = ((BookmarkGrid) grid).findRecipeId(stackA);
if (recipeId == null) {
for (int idx = 0; idx < namespaces.size() && recipeId == null; idx++) {
for (int idx = 0; idx < getNameSpaceSize() && recipeId == null; idx++) {
if (idx == activeNamespaceIndex) continue;
recipeId = namespaces.get(idx).findRecipeId(stackA);
}
@@ -505,18 +548,18 @@ public class BookmarkPanel extends PanelWidget {
protected int fixCountOfNamespaces() {
if (namespaces.get(namespaces.size() - 1).size() > 0) {
if (namespaces.get(getNameSpaceSize() - 1).size() > 0) {
namespaces.add(new BookmarkGrid());
} else if (activeNamespaceIndex == namespaces.size() - 2 && grid.size() == 0) {
namespaces.remove(namespaces.size() - 1);
} else if (activeNamespaceIndex == getNameSpaceSize() - 2 && grid.size() == 0) {
namespaces.remove(getNameSpaceSize() - 1);
}
return namespaces.size();
return getNameSpaceSize();
}
protected boolean removeEmptyNamespaces() {
if (activeNamespaceIndex != namespaces.size() - 1 && grid.size() == 0) {
if (activeNamespaceIndex != getNameSpaceSize() - 1 && grid.size() == 0) {
namespaces.remove(activeNamespaceIndex);
grid = namespaces.get(activeNamespaceIndex);
return true;
@@ -534,7 +577,7 @@ public class BookmarkPanel extends PanelWidget {
removeEmptyNamespaces();
if (activeNamespaceIndex == 0) {
activeNamespaceIndex = namespaces.size() - 1;
activeNamespaceIndex = getNameSpaceSize() - 1;
} else {
activeNamespaceIndex--;
}
@@ -608,7 +651,7 @@ public class BookmarkPanel extends PanelWidget {
ArrayList<String> strings = new ArrayList<>();
for (int grpIdx = 0; grpIdx < namespaces.size() - 1; grpIdx++) {
for (int grpIdx = 0; grpIdx < getNameSpaceSize() - 1; grpIdx++) {
final BookmarkGrid grid = namespaces.get(grpIdx);
JsonObject settings = new JsonObject();
@@ -739,7 +782,8 @@ public class BookmarkPanel extends PanelWidget {
.get("ingredient")
.getAsBoolean()
: false,
itemStackNBT.hasKey("gtFluidName")));
itemStackNBT.hasKey("gtFluidName")),
false);
} else {
NEIClientConfig.logger.warn(
"Failed to load bookmarked ItemStack from json string, the item no longer exists:\n{}",
@@ -883,17 +927,12 @@ public class BookmarkPanel extends PanelWidget {
final BookmarkGrid hoverGrid = namespaces.get(activeNamespaceIndex);
final BookmarkGrid sortedGrid = namespaces.get(sortedNamespaceIndex);
if (mouseOverSlot == null) {
mouseOverSlot =
getNextSlot(mousex, mousey, hoverGrid.getViewMode() == BookmarkViewMode.TODO_LIST);
}
if (mouseOverSlot != null) {
if (mouseOverSlot != null || getNextSlot(new Point(mousex, mousey)) >= 0) {
final ItemStack stack = sortedGrid.getItem(sortedStackIndex);
final BookmarkStackMeta meta = sortedGrid.getMetadata(sortedStackIndex);
sortedGrid.removeItem(sortedStackIndex);
hoverGrid.addItem(stack, meta);
hoverGrid.addItem(stack, meta, false);
sortedNamespaceIndex = activeNamespaceIndex;
sortedStackIndex = hoverGrid.indexOf(stack, meta.recipeId);
@@ -938,23 +977,24 @@ public class BookmarkPanel extends PanelWidget {
super.mouseDragged(mousex, mousey, button, heldTime);
}
private ItemPanelSlot getNextSlot(int mousex, int mousey, boolean line) {
private int getNextSlot(final Point point) {
final List<Integer> mask = grid.getMask();
final int columns = grid.getColumns();
final int perPage = grid.getRows() * columns;
final boolean line = ((BookmarkGrid) grid).getViewMode() == BookmarkViewMode.TODO_LIST;
for (int i = mask.size(); i < perPage; i++) {
if (!grid.isInvalidSlot(i) && (!line || (i % columns) == 0)) {
if (grid.getSlotRect(i).contains(mousex, mousey)) {
return new ItemPanelSlot(grid.size() - 1, null);
if (point == null || grid.getSlotRect(i).contains(point.x, point.y)) {
return i;
}
return null;
return -1;
}
}
return null;
return -1;
}
@Override
@@ -973,6 +1013,15 @@ public class BookmarkPanel extends PanelWidget {
GuiContainerManager.drawItems.zLevel -= 100;
}
if (ItemPanels.itemPanel.draggedStack != null && this.contains(mousex, mousey)) {
final int idx = getNextSlot(null);
if (idx >= 0) {
Rectangle4i rect = grid.getSlotRect(idx);
drawRect(rect.x, rect.y, rect.w, rect.h, 0xee555555); // highlight
}
}
super.postDraw(mousex, mousey);
}
@@ -1085,8 +1134,10 @@ public class BookmarkPanel extends PanelWidget {
meta.factor = factor;
} else {
meta.factor = nbTag.getInteger("Count") == factor && shift < 0 ? -1 * factor : factor;
nbTag.setInteger("Count", Math.max(nbTag.getInteger("Count") + factor * shift, factor));
BGrid.replaceItem(slotIndex, StackInfo.loadFromNBT(nbTag));
if ((long) nbTag.getInteger("Count") + ((long) factor * shift) <= Integer.MAX_VALUE) {
nbTag.setInteger("Count", Math.max(nbTag.getInteger("Count") + factor * shift, factor));
BGrid.replaceItem(slotIndex, StackInfo.loadFromNBT(nbTag));
}
}
}
}
+13 -4
View File
@@ -63,7 +63,7 @@ public class ItemsGrid {
public int indexOf(ItemStack stackA, boolean useNBT) {
for (int idx = 0; idx < realItems.size(); idx++) {
if (StackInfo.equalItemAndNBT(stackA, realItems.get(idx), useNBT)) {
if (StackInfo.equalItemAndNBT(stackA, getItem(idx), useNBT)) {
return idx;
}
}
@@ -71,6 +71,11 @@ public class ItemsGrid {
return -1;
}
public void setPage(int page) {
this.page = Math.max(0, Math.min(page, getNumPages() - 1));
onGridChanged();
}
public int getPage() {
return page + 1;
}
@@ -153,8 +158,12 @@ public class ItemsGrid {
invalidSlotMap = new boolean[rows * columns];
perPage = columns * rows;
checkGuiOverlap(gui, 0, columns - 2, 1);
checkGuiOverlap(gui, columns - 1, 1, -1);
if (NEIClientConfig.optimizeGuiOverlapComputation()) {
checkGuiOverlap(gui, 0, columns - 2, 1);
checkGuiOverlap(gui, columns - 1, 1, -1);
} else {
checkGuiOverlap(gui, 0, columns, 1);
}
if (oldRows != rows || oldColumns != columns || !Arrays.equals(oldSlotMap, invalidSlotMap)) {
onGridChanged();
@@ -164,7 +173,7 @@ public class ItemsGrid {
private void checkGuiOverlap(GuiContainer gui, int start, int end, int dir) {
boolean validColumn = false;
for (int c = start; c != end && !validColumn; c += dir) {
for (int c = start; c != end && (!NEIClientConfig.optimizeGuiOverlapComputation() || !validColumn); c += dir) {
validColumn = true;
for (int r = 0; r < rows; r++) {
@@ -141,6 +141,13 @@ public class NEICPH implements IClientPacketHandler {
packet.sendToServer();
}
public static void sendRequestContainer() {
PacketCustom packet = new PacketCustom(channel, 16);
packet.writeInt(
Minecraft.getMinecraft().thePlayer.openContainer.getInventory().size());
packet.sendToServer();
}
public static void sendSetSlot(int slot, ItemStack stack, boolean container) {
PacketCustom packet = new PacketCustom(channel, 5);
packet.writeBoolean(container);
@@ -237,6 +237,10 @@ public class NEIClientConfig {
.setComment("Use NBT in Bookmarks")
.getBooleanValue(true);
API.addOption(new OptionToggleButton("inventory.useNBTInBookmarks", true));
tag.getTag("inventory.bookmarksAnimationEnabled")
.setComment("REI Style Animation in Bookmarks")
.getBooleanValue(true);
API.addOption(new OptionToggleButton("inventory.bookmarksAnimationEnabled", true));
tag.getTag("inventory.showRecipeMarker")
.setComment("Show Recipe Marker")
.getBooleanValue(false);
@@ -270,6 +274,11 @@ public class NEIClientConfig {
.getBooleanValue(false);
API.addOption(new OptionToggleButton("inventory.ignore_potion_overlap", true));
tag.getTag("inventory.optimize_gui_overlap_computation")
.setComment("Optimize computation for GUI overlap")
.getBooleanValue(false);
API.addOption(new OptionToggleButton("inventory.optimize_gui_overlap_computation", true));
tag.getTag("tools.handler_load_from_config")
.setComment("ADVANCED: Load handlers from config")
.getBooleanValue(false);
@@ -344,6 +353,8 @@ public class NEIClientConfig {
API.addHashBind("gui.overlay_use", Keyboard.KEY_S + NEIClientUtils.SHIFT_HASH);
API.addHashBind("gui.overlay_hide", Keyboard.KEY_S + NEIClientUtils.CTRL_HASH);
API.addHashBind("gui.hide_bookmarks", Keyboard.KEY_B);
API.addKeyBind("gui.getprevioussearch", Keyboard.KEY_UP);
API.addKeyBind("gui.getnextsearch", Keyboard.KEY_DOWN);
API.addKeyBind("world.chunkoverlay", Keyboard.KEY_F9);
API.addKeyBind("world.moboverlay", Keyboard.KEY_F7);
@@ -502,6 +513,10 @@ public class NEIClientConfig {
return getBooleanSetting("inventory.useNBTInBookmarks");
}
public static boolean areBookmarksAnimated() {
return getBooleanSetting("inventory.bookmarksAnimationEnabled");
}
public static boolean showRecipeMarker() {
return getBooleanSetting("inventory.showRecipeMarker");
}
@@ -530,6 +545,10 @@ public class NEIClientConfig {
return getBooleanSetting("inventory.ignore_potion_overlap");
}
public static boolean optimizeGuiOverlapComputation() {
return getBooleanSetting("inventory.optimize_gui_overlap_computation");
}
public static boolean isEnabled() {
return enabledOverride && getBooleanSetting("inventory.widgetsenabled");
}
@@ -64,6 +64,9 @@ public class NEISPH implements IServerPacketHandler {
case 15:
handleMobSpawnerID(sender.worldObj, packet.readCoord(), packet.readString());
break;
case 16:
handleRequestContainer(sender, packet.readInt());
break;
case 21:
openEnchantmentGui(sender);
break;
@@ -99,6 +102,11 @@ public class NEISPH implements IServerPacketHandler {
}
}
private void handleRequestContainer(EntityPlayerMP sender, int containerSize) {
if (sender.openContainer.getInventory().size() != containerSize) return;
sender.sendContainerToPlayer(sender.openContainer);
}
private void handlePropertyChange(EntityPlayerMP sender, PacketCustom packet) {
String name = packet.readString();
if (NEIServerConfig.canPlayerPerformAction(sender.getCommandSenderName(), name))
@@ -183,8 +183,7 @@ public abstract class PanelWidget extends Widget {
if (mouseDownSlot >= 0
&& draggedStack == null
&& NEIClientUtils.getHeldItem() == null
&& NEIClientConfig.hasSMPCounterPart()
&& !GuiInfo.hasCustomSlots(NEIClientUtils.getGuiContainer())) {
&& NEIClientConfig.hasSMPCounterPart()) {
ItemPanelSlot mouseOverSlot = getSlotMouseOver(mousex, mousey);
if (mouseOverSlot == null || mouseOverSlot.slotIndex != mouseDownSlot || heldTime > 500) {
@@ -241,6 +240,13 @@ public abstract class PanelWidget extends Widget {
@Override
public boolean handleClickExt(int mouseX, int mouseY, int button) {
if (ItemPanels.itemPanel.draggedStack != null && ItemPanels.bookmarkPanel.contains(mouseX, mouseY)) {
ItemPanels.bookmarkPanel.addOrRemoveItem(ItemPanels.itemPanel.draggedStack, null, null, false, true);
ItemPanels.itemPanel.draggedStack = null;
return true;
}
if (ItemPanels.itemPanel.draggedStack != null) {
return ItemPanels.itemPanel.handleDraggedClick(mouseX, mouseY, button);
}
@@ -43,7 +43,11 @@ public class PositionedStack {
if (item.getItemDamage() == Short.MAX_VALUE) {
List<ItemStack> permutations = ItemList.itemMap.get(item.getItem());
if (!permutations.isEmpty()) {
for (ItemStack stack : permutations) stacks.add(stack.copy());
for (ItemStack stack : permutations) {
ItemStack toAdd = stack.copy();
toAdd.stackSize = item.stackSize;
stacks.add(toAdd);
}
} else {
ItemStack base = new ItemStack(item.getItem(), item.stackSize);
base.stackTagCompound = item.stackTagCompound;
@@ -9,6 +9,7 @@ import codechicken.nei.ItemList.PatternItemFilter;
import codechicken.nei.api.API;
import codechicken.nei.api.ItemFilter;
import codechicken.nei.api.ItemFilter.ItemFilterProvider;
import codechicken.nei.util.TextHistory;
import java.util.LinkedList;
import java.util.List;
import java.util.regex.Pattern;
@@ -45,6 +46,7 @@ public class SearchField extends TextField implements ItemFilterProvider {
}
public static List<ISearchProvider> searchProviders = new LinkedList<>();
private static final TextHistory history = new TextHistory();
private boolean isVisible = true;
long lastclicktime;
@@ -116,6 +118,13 @@ public class SearchField extends TextField implements ItemFilterProvider {
if (isVisible() && NEIClientConfig.isKeyHashDown("gui.search")) {
setFocus(true);
}
if (NEIClientConfig.isKeyHashDown("gui.getprevioussearch") && focused()) {
handleNavigateHistory(TextHistory.Direction.PREVIOUS);
}
if (NEIClientConfig.isKeyHashDown("gui.getnextsearch") && focused()) {
handleNavigateHistory(TextHistory.Direction.NEXT);
}
}
@Override
@@ -156,4 +165,26 @@ public class SearchField extends TextField implements ItemFilterProvider {
if (!secondary.isEmpty()) return new AnyMultiItemFilter(secondary);
return new EverythingItemFilter();
}
@Override
public void setFocus(boolean focus) {
final boolean previousFocus = field.isFocused();
if (previousFocus != focus) {
history.add(text());
}
super.setFocus(focus);
}
private boolean handleNavigateHistory(TextHistory.Direction direction) {
if (focused()) {
return history.get(direction, text())
.map(newText -> {
setText(newText);
return true;
})
.orElse(false);
}
return false;
}
}
+21 -10
View File
@@ -24,6 +24,7 @@ import codechicken.nei.recipe.IUsageHandler;
import codechicken.nei.recipe.RecipeCatalysts;
import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.recipe.StackInfo;
import com.google.common.collect.Sets;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@@ -130,16 +131,20 @@ public class API {
* Damage values of OreDictionary.WILDCARD_VALUE and ItemStackMap.WILDCARD_TAG tags function as wildcards for their respective variables
*/
public static void hideItem(ItemStack item) {
ItemInfo.hiddenItems.add(item);
LayoutManager.markItemsDirty();
if (!ItemInfo.hiddenItems.contains(item)) {
ItemInfo.hiddenItems.add(item);
LayoutManager.markItemsDirty();
}
}
/**
* Add or replace the name normally shown on the item tooltip
*/
public static void setOverrideName(ItemStack item, String name) {
ItemInfo.nameOverrides.put(item, name);
LayoutManager.markItemsDirty();
if (!name.equals(ItemInfo.nameOverrides.get(item))) {
ItemInfo.nameOverrides.put(item, name);
LayoutManager.markItemsDirty();
}
}
/**
@@ -147,8 +152,10 @@ public class API {
* @param item an item with data
*/
public static void addItemListEntry(ItemStack item) {
ItemInfo.itemOverrides.put(item.getItem(), item);
LayoutManager.markItemsDirty();
if (!ItemInfo.itemOverrides.containsEntry(item.getItem(), item)) {
ItemInfo.itemOverrides.put(item.getItem(), item);
LayoutManager.markItemsDirty();
}
}
/**
@@ -156,8 +163,10 @@ public class API {
*/
public static void setItemListEntries(Item item, Iterable<ItemStack> items) {
if (items == null) items = Collections.emptyList();
ItemInfo.itemOverrides.replaceValues(item, items);
LayoutManager.markItemsDirty();
if (!Sets.newHashSet(items).equals(Sets.newHashSet(ItemInfo.itemOverrides.get(item)))) {
ItemInfo.itemOverrides.replaceValues(item, items);
LayoutManager.markItemsDirty();
}
}
/**
@@ -294,8 +303,10 @@ public class API {
* @param variant The stack to appear in the item panel
*/
public static void addItemVariant(Item item, ItemStack variant) {
ItemInfo.itemVariants.put(item, variant);
LayoutManager.markItemsDirty();
if (!ItemInfo.itemVariants.containsEntry(item, variant)) {
ItemInfo.itemVariants.put(item, variant);
LayoutManager.markItemsDirty();
}
}
public static void registerStackStringifyHandler(IStackStringifyHandler handler) {
@@ -3,13 +3,18 @@ package codechicken.nei.api;
import codechicken.nei.VisiblityData;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
/**
* Lets you just override those things you want to
*/
public class INEIGuiAdapter implements INEIGuiHandler {
static final Pattern SPECIAL_REGEX_CHARS = Pattern.compile("[{}()\\[\\].+*?^$\\\\|]");
@Override
public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility) {
return currentVisibility;
@@ -34,4 +39,10 @@ public class INEIGuiAdapter implements INEIGuiHandler {
public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
return false;
}
protected String formattingText(String displayName) {
return SPECIAL_REGEX_CHARS
.matcher(EnumChatFormatting.getTextWithoutFormattingCodes(displayName))
.replaceAll("\\\\$0");
}
}
@@ -108,6 +108,7 @@ public abstract class ShortcutInputHandler {
if (gui instanceof GuiRecipe) {
ingredients = ((GuiRecipe<?>) gui).getFocusedRecipeIngredients();
handlerName = ((GuiRecipe<?>) gui).getHandlerName();
stack.stackSize = ((GuiRecipe<?>) gui).prepareFocusedRecipeResultStackSize(stack);
}
ItemPanels.bookmarkPanel.addOrRemoveItem(stack, handlerName, ingredients, saveIngredients, saveStackSize);
@@ -3,6 +3,7 @@ package codechicken.nei.drawable;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.GuiScreen;
import org.lwjgl.opengl.GL11;
/*
* Taken from Mantle 1.12-1.3.3.49 under the MIT License
@@ -70,6 +71,7 @@ public class GuiElementDuex {
*/
public int draw(int xPos, int yPos) {
// drawModalRectWithCustomSizedTexture
GL11.glColor4f(1, 1, 1, 1);
GuiScreen.func_146110_a(xPos, yPos, x, y, w, h, texW, texH);
return w;
}
@@ -152,7 +152,7 @@ public class GuiContainerManager {
return namelist;
}
protected static String itemCountDetails(ItemStack stack) {
public static String itemCountDetails(ItemStack stack) {
final FluidStack fluid = StackInfo.getFluid(stack);
int maxStackSize = stack.getMaxStackSize();
int stackSize = stack.stackSize;
@@ -336,7 +336,7 @@ public class GuiContainerManager {
}
private int clickHandled = 0;
private final List<IContainerTooltipHandler> instanceTooltipHandlers;
public final List<IContainerTooltipHandler> instanceTooltipHandlers;
public GuiContainerManager(GuiContainer screen) {
window = screen;
@@ -479,14 +479,7 @@ public class GuiContainerManager {
font = getFontRenderer(stack);
if (stack != null) {
tooltip = itemDisplayNameMultiline(stack, window, true);
if (stack.stackSize != Integer.MAX_VALUE && NEIClientUtils.shiftKey()) {
final String itemCount = itemCountDetails(stack);
if (itemCount != null) {
tooltip.add(String.format(EnumChatFormatting.GRAY + itemCount + EnumChatFormatting.RESET));
}
}
applyItemCountDetails(tooltip, stack);
}
synchronized (instanceTooltipHandlers) {
@@ -506,6 +499,16 @@ public class GuiContainerManager {
return window.mc.thePlayer.inventory.getItemStack() == null;
}
public static void applyItemCountDetails(List<String> tooltip, ItemStack stack) {
if (stack.stackSize != Integer.MAX_VALUE && NEIClientUtils.shiftKey()) {
final String itemCount = itemCountDetails(stack);
if (itemCount != null) {
tooltip.add(String.format(EnumChatFormatting.GRAY + itemCount + EnumChatFormatting.RESET));
}
}
}
public void renderSlotUnderlay(Slot slot) {
for (IContainerDrawHandler drawHandler : drawHandlers) drawHandler.renderSlotUnderlay(window, slot);
}
@@ -3,6 +3,7 @@ package codechicken.nei.recipe;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.GuiNEIButton;
import codechicken.nei.LayoutManager;
import codechicken.nei.NEICPH;
import codechicken.nei.NEIClientConfig;
import codechicken.nei.NEIClientUtils;
import codechicken.nei.PositionedStack;
@@ -273,6 +274,32 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer
return null;
}
public int prepareFocusedRecipeResultStackSize(ItemStack stackover) {
final int recipesPerPage = getRecipesPerPage();
for (int idx = page * recipesPerPage; idx < handler.numRecipes() && idx < (page + 1) * recipesPerPage; idx++) {
if (recipeInFocus(idx)) {
final PositionedStack result = handler.getResultStack(idx);
int stackSize = 0;
if (result != null && StackInfo.equalItemAndNBT(result.item, stackover, true)) {
stackSize += result.item.stackSize;
}
final List<PositionedStack> stacks = handler.getOtherStacks(idx);
for (PositionedStack pStack : stacks) {
if (StackInfo.equalItemAndNBT(pStack.item, stackover, true)) {
stackSize += pStack.item.stackSize;
}
}
return stackSize;
}
}
return stackover.stackSize;
}
protected boolean recipeInFocus(int idx) {
final PositionedStack result = handler.getResultStack(idx);
if (result != null && isMouseOver(result, idx)) {
@@ -310,6 +337,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer
if (i == Keyboard.KEY_ESCAPE) // esc
{
mc.displayGuiScreen(firstGuiGeneral);
NEICPH.sendRequestContainer();
return;
}
if (GuiContainerManager.getManager(this).lastKeyTyped(i, c)) return;
@@ -320,6 +348,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer
if (i == mc.gameSettings.keyBindInventory.getKeyCode()) {
mc.displayGuiScreen(firstGuiGeneral);
NEICPH.sendRequestContainer();
} else if (NEIClientConfig.isKeyHashDown("gui.back")) {
mc.displayGuiScreen(prevGui);
} else if (NEIClientConfig.isKeyHashDown("gui.prev_machine")) {
@@ -190,7 +190,7 @@ public abstract class GuiRecipeTab extends Widget {
final boolean fromJar = NEIClientConfig.loadHandlersFromJar();
NEIClientConfig.logger.info("Loading handler info from " + (fromJar ? "JAR" : "Config"));
handlerMap.clear();
URL handlerUrl = Thread.currentThread().getContextClassLoader().getResource("assets/nei/csv/handlers.csv");
URL handlerUrl = GuiRecipeTab.class.getResource("/assets/nei/csv/handlers.csv");
URL url;
if (fromJar) {
@@ -120,7 +120,7 @@ public class RecipeCatalysts {
final boolean fromJar = NEIClientConfig.loadCatalystsFromJar();
NEIClientConfig.logger.info("Loading catalyst info from " + (fromJar ? "JAR" : "Config"));
recipeCatalystMap.clear();
URL handlerUrl = Thread.currentThread().getContextClassLoader().getResource("assets/nei/csv/catalysts.csv");
URL handlerUrl = RecipeCatalysts.class.getResource("/assets/nei/csv/catalysts.csv");
URL url;
if (fromJar) {
@@ -3,16 +3,12 @@ package codechicken.nei.recipe;
import static codechicken.nei.LayoutManager.searchField;
import codechicken.nei.api.INEIGuiAdapter;
import java.util.regex.Pattern;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.fluids.FluidStack;
public class SearchInputDropHandler extends INEIGuiAdapter {
protected static final Pattern SPECIAL_REGEX_CHARS = Pattern.compile("[{}()\\[\\].+*?^$\\\\|]");
@Override
public boolean handleDragNDrop(GuiContainer gui, int mouseX, int mouseY, ItemStack draggedStack, int button) {
@@ -30,10 +26,4 @@ public class SearchInputDropHandler extends INEIGuiAdapter {
return false;
}
protected String formattingText(String displayName) {
return SPECIAL_REGEX_CHARS
.matcher(EnumChatFormatting.getTextWithoutFormattingCodes(displayName))
.replaceAll("\\\\$0");
}
}
@@ -165,8 +165,7 @@ public class StackInfo {
}
} else {
final URL filterUrl =
Thread.currentThread().getContextClassLoader().getResource("assets/nei/guidfilters.cfg");
final URL filterUrl = StackInfo.class.getResource("/assets/nei/guidfilters.cfg");
try (BufferedReader reader = new BufferedReader(new InputStreamReader(filterUrl.openStream()))) {
itemStrings = IOUtils.readLines(reader);
@@ -605,7 +605,11 @@ public abstract class TemplateRecipeHandler implements ICraftingHandler, IUsageH
}
public PositionedStack getResultStack(int recipe) {
return arecipes.get(recipe).getResult();
try {
return arecipes.get(recipe).getResult();
} catch (ArrayIndexOutOfBoundsException ignored) {
return null;
}
}
public List<PositionedStack> getOtherStacks(int recipe) {
@@ -0,0 +1,96 @@
package codechicken.nei.util;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.Format;
/**
* copy from ae2
* Converter class to convert a large number into a SI system.
*
* @author thatsIch
* @version rv2
* @since rv2
*/
public enum ReadableNumberConverter {
INSTANCE;
/**
* Defines the base for a division, non-si standard could be 1024 for kilobytes
*/
private static final int DIVISION_BASE = 1000;
/**
* String representation of the sorted postfixes
*/
private static final char[] ENCODED_POSTFIXES = "KMGTPE".toCharArray();
private final Format format;
/**
* Initializes the specific decimal format with special format for negative and positive numbers
*/
ReadableNumberConverter() {
final DecimalFormatSymbols symbols = new DecimalFormatSymbols();
symbols.setDecimalSeparator('.');
symbols.setGroupingSeparator(',');
final DecimalFormat format = new DecimalFormat(".#;0.#");
format.setDecimalFormatSymbols(symbols);
format.setRoundingMode(RoundingMode.DOWN);
this.format = format;
}
public String toSlimReadableForm(final long number) {
return this.toReadableFormRestrictedByWidth(number, 3);
}
/**
* restricts a string representation of a number to a specific width
*
* @param number to be formatted number
* @param width width limitation of the resulting number
* @return formatted number restricted by the width limitation
*/
private String toReadableFormRestrictedByWidth(final long number, final int width) {
assert number >= 0;
// handles low numbers more efficiently since no format is needed
final String numberString = Long.toString(number);
int numberSize = numberString.length();
if (numberSize <= width) {
return numberString;
}
long base = number;
double last = base * 1000;
int exponent = -1;
String postFix = "";
while (numberSize > width) {
last = base;
base /= DIVISION_BASE;
exponent++;
// adds +1 due to the postfix
numberSize = Long.toString(base).length() + 1;
postFix = String.valueOf(ENCODED_POSTFIXES[exponent]);
}
final String withPrecision = this.format.format(last / DIVISION_BASE) + postFix;
final String withoutPrecision = Long.toString(base) + postFix;
final String slimResult = (withPrecision.length() <= width) ? withPrecision : withoutPrecision;
// post condition
assert slimResult.length() <= width;
return slimResult;
}
public String toWideReadableForm(final long number) {
return this.toReadableFormRestrictedByWidth(number, 4);
}
}
@@ -0,0 +1,69 @@
package codechicken.nei.util;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
/**
* Backported from JustEnoughItems/Core/src/main/java/mezz/jei/core/util/TextHistory.java
*/
public class TextHistory {
private static final int MAX_HISTORY = 100;
public enum Direction {
NEXT,
PREVIOUS
}
private final List<String> history = new ArrayList<>();
public boolean add(String currentText) {
if (currentText.length() > 0) {
history.remove(currentText);
history.add(currentText);
if (history.size() > MAX_HISTORY) {
history.remove(0);
}
return true;
}
return false;
}
public Optional<String> get(Direction direction, String currentText) {
if (direction == direction.NEXT) {
return getNext(currentText);
} else {
return getPrevious(currentText);
}
}
public Optional<String> getPrevious(String currentText) {
int historyIndex = history.indexOf(currentText);
if (historyIndex < 0) {
if (add(currentText)) {
historyIndex = history.size() - 1;
} else {
historyIndex = history.size();
}
}
if (historyIndex <= 0) {
return Optional.empty();
}
String value = history.get(historyIndex - 1);
return Optional.of(value);
}
public Optional<String> getNext(String currentText) {
int historyIndex = history.indexOf(currentText);
if (historyIndex < 0) {
return Optional.empty();
}
final String historyString;
if (historyIndex + 1 < history.size()) {
historyString = history.get(historyIndex + 1);
} else {
historyString = "";
}
return Optional.of(historyString);
}
}
@@ -8,6 +8,7 @@ advsolar.client.nei.MTRecipeHandler,AdvancedSolarPanel:BlockMolecularTransformer
crafting,appliedenergistics2:item.ItemMultiPart:360,,appliedenergistics2,TRUE,,,,,,
appeng.integration.modules.NEIHelpers.NEIGrinderRecipeHandler,appliedenergistics2:tile.BlockGrinder,,appliedenergistics2,TRUE,dreamcraft,,,,,
appeng.integration.modules.NEIHelpers.NEIInscriberRecipeHandler,appliedenergistics2:tile.BlockInscriber,,appliedenergistics2,TRUE,,,,,,
appeng.integration.modules.NEIHelpers.NEIInscriberRecipeHandler,ae2stuff:Inscriber,,ae2stuff,TRUE,,,,,,
fox.spiteful.avaritia.compat.nei.CompressionHandler,Avaritia:Neutronium_Compressor,,Avaritia,TRUE,,,,,,
extreme,Avaritia:Dire_Crafting,,Avaritia,TRUE,,,,,,
extreme,avaritiaddons:ExtremeAutoCrafter,,avaritiaddons,TRUE,,,,,,
@@ -826,11 +827,11 @@ gt.recipe.dieselgeneratorfuel,gregtech:gt.blockmachines:1112,,gregtech,TRUE,greg
gt.recipe.gasturbinefuel,gregtech:gt.blockmachines:1115,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.gasturbinefuel,gregtech:gt.blockmachines:1116,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.gasturbinefuel,gregtech:gt.blockmachines:1117,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.fluidnaquadahreactor,gregtech:gt.blockmachines:1190,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.fluidnaquadahreactor,gregtech:gt.blockmachines:1191,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.smallnaquadahreactor,gregtech:gt.blockmachines:1190,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.largenaquadahreactor,gregtech:gt.blockmachines:1191,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.fluidnaquadahreactor,gregtech:gt.blockmachines:1192,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.fluidnaquadahreactor,gregtech:gt.blockmachines:1188,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.fluidnaquadahreactor,gregtech:gt.blockmachines:1189,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.hugenaquadahreactor,gregtech:gt.blockmachines:1188,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.extrahugenaquadahreactor,gregtech:gt.blockmachines:1189,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.magicfuels,gregtech:gt.blockmachines:1123,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.magicfuels,gregtech:gt.blockmachines:1124,,gregtech,TRUE,gregapi_post,,,,,
gt.recipe.magicfuels,gregtech:gt.blockmachines:1125,,gregtech,TRUE,gregapi_post,,,,,
@@ -1185,6 +1186,7 @@ gt.recipe.rockbreaker,gregtech:gt.blockmachines:31065,,miscutils,TRUE,,,,,,
gt.recipe.fermenter,gregtech:gt.blockmachines:860,,miscutils,TRUE,,,,,,
gt.recipe.fluidextractor,gregtech:gt.blockmachines:860,,miscutils,TRUE,,,,,,
gt.recipe.fluidsolidifier,gregtech:gt.blockmachines:860,,miscutils,TRUE,,,,,,
gt.recipe.distillery,gregtech:gt.blockmachines:31021,,miscutils,TRUE,,,,,,
gt.recipe.distillationtower,gregtech:gt.blockmachines:31021,,miscutils,TRUE,,,,,,
gt.recipe.chemicalbath,gregtech:gt.blockmachines:850,,miscutils,TRUE,,,,,,
gt.recipe.polarizer,gregtech:gt.blockmachines:860,,miscutils,TRUE,,,,,,
@@ -1263,7 +1265,7 @@ bw.recipe.biolab,gregtech:gt.blockmachines:12706,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12707,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12708,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12709,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12711,,bartworks,TRUE,,,,,,
bw.recipe.biolab,gregtech:gt.blockmachines:12710,,bartworks,TRUE,,,,,,
bw.recipe.BacteriaVat,gregtech:gt.blockmachines:12712,,bartworks,TRUE,,,,,,
gt.recipe.electricimplosioncompressor,gregtech:gt.blockmachines:12734,,bartworks,TRUE,,,,,,
gt.recipe.dieselgeneratorfuel,gregtech:gt.blockmachines:1113,,GoodGenerator,TRUE,,,,,,
1 handler itemName nbtInfo modId modRequired excludedModId priority minVersion maxVersion forceClassName itemNotes
8 crafting appliedenergistics2:item.ItemMultiPart:360 appliedenergistics2 TRUE
9 appeng.integration.modules.NEIHelpers.NEIGrinderRecipeHandler appliedenergistics2:tile.BlockGrinder appliedenergistics2 TRUE dreamcraft
10 appeng.integration.modules.NEIHelpers.NEIInscriberRecipeHandler appliedenergistics2:tile.BlockInscriber appliedenergistics2 TRUE
11 appeng.integration.modules.NEIHelpers.NEIInscriberRecipeHandler ae2stuff:Inscriber ae2stuff TRUE
12 fox.spiteful.avaritia.compat.nei.CompressionHandler Avaritia:Neutronium_Compressor Avaritia TRUE
13 extreme Avaritia:Dire_Crafting Avaritia TRUE
14 extreme avaritiaddons:ExtremeAutoCrafter avaritiaddons TRUE
827 gt.recipe.gasturbinefuel gregtech:gt.blockmachines:1115 gregtech TRUE gregapi_post
828 gt.recipe.gasturbinefuel gregtech:gt.blockmachines:1116 gregtech TRUE gregapi_post
829 gt.recipe.gasturbinefuel gregtech:gt.blockmachines:1117 gregtech TRUE gregapi_post
830 gt.recipe.fluidnaquadahreactor gt.recipe.smallnaquadahreactor gregtech:gt.blockmachines:1190 gregtech TRUE gregapi_post
831 gt.recipe.fluidnaquadahreactor gt.recipe.largenaquadahreactor gregtech:gt.blockmachines:1191 gregtech TRUE gregapi_post
832 gt.recipe.fluidnaquadahreactor gregtech:gt.blockmachines:1192 gregtech TRUE gregapi_post
833 gt.recipe.fluidnaquadahreactor gt.recipe.hugenaquadahreactor gregtech:gt.blockmachines:1188 gregtech TRUE gregapi_post
834 gt.recipe.fluidnaquadahreactor gt.recipe.extrahugenaquadahreactor gregtech:gt.blockmachines:1189 gregtech TRUE gregapi_post
835 gt.recipe.magicfuels gregtech:gt.blockmachines:1123 gregtech TRUE gregapi_post
836 gt.recipe.magicfuels gregtech:gt.blockmachines:1124 gregtech TRUE gregapi_post
837 gt.recipe.magicfuels gregtech:gt.blockmachines:1125 gregtech TRUE gregapi_post
1186 gt.recipe.fermenter gregtech:gt.blockmachines:860 miscutils TRUE
1187 gt.recipe.fluidextractor gregtech:gt.blockmachines:860 miscutils TRUE
1188 gt.recipe.fluidsolidifier gregtech:gt.blockmachines:860 miscutils TRUE
1189 gt.recipe.distillery gregtech:gt.blockmachines:31021 miscutils TRUE
1190 gt.recipe.distillationtower gregtech:gt.blockmachines:31021 miscutils TRUE
1191 gt.recipe.chemicalbath gregtech:gt.blockmachines:850 miscutils TRUE
1192 gt.recipe.polarizer gregtech:gt.blockmachines:860 miscutils TRUE
1265 bw.recipe.biolab gregtech:gt.blockmachines:12707 bartworks TRUE
1266 bw.recipe.biolab gregtech:gt.blockmachines:12708 bartworks TRUE
1267 bw.recipe.biolab gregtech:gt.blockmachines:12709 bartworks TRUE
1268 bw.recipe.biolab gregtech:gt.blockmachines:12711 gregtech:gt.blockmachines:12710 bartworks TRUE
1269 bw.recipe.BacteriaVat gregtech:gt.blockmachines:12712 bartworks TRUE
1270 gt.recipe.electricimplosioncompressor gregtech:gt.blockmachines:12734 bartworks TRUE
1271 gt.recipe.dieselgeneratorfuel gregtech:gt.blockmachines:1113 GoodGenerator TRUE
@@ -24,8 +24,8 @@ WayofTime.alchemicalWizardry.client.nei.NEIBloodOrbShapedHandler,Blood Magic,AWW
WayofTime.alchemicalWizardry.client.nei.NEIBloodOrbShapelessHandler,Blood Magic,AWWayofTime:AlchemicalWizardrybloodRune:4,,AWWayofTime,TRUE,,,65,,5,,,,,,
bw.fuels.acidgens,BartWorks,gregtech:gt.blockmachines:12726,,bartworks,TRUE,,6,145,,2,,,,,,
bw.recipe.cal,BartWorks,gregtech:gt.blockmachines:12735,,bartworks,TRUE,,6,135,,2,,,,,,
gg.recipe.naquadah_reactor,Good Generator,gregtech:gt.blockmachines:12732,,GoodGenerator,TRUE,,,145,,1,,,,,,
gg.recipe.naquadah_fuel_refine_factory,Good Generator,gregtech:gt.blockmachines:16999,,GoodGenerator,TRUE,,,145,,1,,,,,,
gg.recipe.naquadah_reactor,Good Generator,gregtech:gt.blockmachines:12732,,GoodGenerator,TRUE,,6,145,,1,,,,,,
gg.recipe.naquadah_fuel_refine_factory,Good Generator,gregtech:gt.blockmachines:16999,,GoodGenerator,TRUE,,6,145,,1,,,,,,
com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_BioLabHandler,BartWorks,gregtech:gt.blockmachines:12699,,bartworks,TRUE,,6,145,,2,,,,,,
com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_BioVatHandler,BartWorks,gregtech:gt.blockmachines:12712,,bartworks,TRUE,,6,140,,2,,,,,,
com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_OreHandler,BartWorks,bartworks:bw.blockores.01:89,,bartworks,TRUE,,,135,,2,,,,,,
@@ -48,14 +48,14 @@ com.rwtema.extrautils.nei.InfoHandler,Extra Utilities,ExtraUtilities:chandelier,
com.rwtema.extrautils.nei.MicroBlocksHandler,Extra Utilities,ExtraUtilities:microblocks:1,,ExtraUtilities,TRUE,,,,,,,,,,,
com.rwtema.extrautils.nei.SoulHandler,Extra Utilities,ExtraUtilities:mini-soul,,ExtraUtilities,TRUE,,,,,,,,,,,
hellfirepvp.beebetteratbees.client.gui.BBABGuiRecipeTreeHandler,Bees,Forestry:beeQueenGE,,Forestry,TRUE,,,140,,2,,,,,,
forestry.factory.recipes.nei.NEIHandlerBottler,Forestry for Minecraft,Forestry:factory,,Forestry,TRUE,,,68,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerCarpenter,Forestry for Minecraft,Forestry:factory:1,,Forestry,TRUE,,,65,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerCentrifuge,Forestry for Minecraft,Forestry:factory:2,,Forestry,TRUE,,,65,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerBottler,Forestry for Minecraft,Forestry:factory,,Forestry,TRUE,,,84,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerCarpenter,Forestry for Minecraft,Forestry:factory:1,,Forestry,TRUE,,,81,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerCentrifuge,Forestry for Minecraft,Forestry:factory:2,,Forestry,TRUE,,,81,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerFabricator,Forestry for Minecraft,Forestry:factory2,,Forestry,TRUE,,,,,,,,,,,
forestry.factory.recipes.nei.NEIHandlerFermenter,Forestry for Minecraft,Forestry:factory:3,,Forestry,TRUE,,,65,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerMoistener,Forestry for Minecraft,Forestry:factory:4,,Forestry,TRUE,,,68,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerSqueezer,Forestry for Minecraft,Forestry:factory:5,,Forestry,TRUE,,,68,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerStill,Forestry for Minecraft,Forestry:factory:6,,Forestry,TRUE,,,65,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerFermenter,Forestry for Minecraft,Forestry:factory:3,,Forestry,TRUE,,,81,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerMoistener,Forestry for Minecraft,Forestry:factory:4,,Forestry,TRUE,,,84,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerSqueezer,Forestry for Minecraft,Forestry:factory:5,,Forestry,TRUE,,,84,,5,,,,,,
forestry.factory.recipes.nei.NEIHandlerStill,Forestry for Minecraft,Forestry:factory:6,,Forestry,TRUE,,,81,,5,,,,,,
net.bdew.neiaddons.forestry.bees.BeeBreedingHandler,Forestry for Minecraft,Forestry:beeQueenGE,,Forestry,TRUE,,,65,,5,,,,,,
net.bdew.neiaddons.forestry.bees.BeeProduceHandler,Forestry for Minecraft,Forestry:beeQueenGE,,Forestry,TRUE,,,65,,5,,,,,,
net.bdew.neiaddons.forestry.butterflies.ButterflyBreedingHandler,Forestry for Minecraft,Forestry:butterflyGE,,Forestry,TRUE,,,,,,,,,,,
1 handler modName itemName nbtInfo modId modRequired excludedModId yShift handlerHeight handlerWidth maxRecipesPerPage imageResource imageX imageY imageWidth imageHeight itemNotes
24 WayofTime.alchemicalWizardry.client.nei.NEIBloodOrbShapelessHandler Blood Magic AWWayofTime:AlchemicalWizardrybloodRune:4 AWWayofTime TRUE 65 5
25 bw.fuels.acidgens BartWorks gregtech:gt.blockmachines:12726 bartworks TRUE 6 145 2
26 bw.recipe.cal BartWorks gregtech:gt.blockmachines:12735 bartworks TRUE 6 135 2
27 gg.recipe.naquadah_reactor Good Generator gregtech:gt.blockmachines:12732 GoodGenerator TRUE 6 145 1
28 gg.recipe.naquadah_fuel_refine_factory Good Generator gregtech:gt.blockmachines:16999 GoodGenerator TRUE 6 145 1
29 com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_BioLabHandler BartWorks gregtech:gt.blockmachines:12699 bartworks TRUE 6 145 2
30 com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_BioVatHandler BartWorks gregtech:gt.blockmachines:12712 bartworks TRUE 6 140 2
31 com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_OreHandler BartWorks bartworks:bw.blockores.01:89 bartworks TRUE 135 2
48 com.rwtema.extrautils.nei.MicroBlocksHandler Extra Utilities ExtraUtilities:microblocks:1 ExtraUtilities TRUE
49 com.rwtema.extrautils.nei.SoulHandler Extra Utilities ExtraUtilities:mini-soul ExtraUtilities TRUE
50 hellfirepvp.beebetteratbees.client.gui.BBABGuiRecipeTreeHandler Bees Forestry:beeQueenGE Forestry TRUE 140 2
51 forestry.factory.recipes.nei.NEIHandlerBottler Forestry for Minecraft Forestry:factory Forestry TRUE 68 84 5
52 forestry.factory.recipes.nei.NEIHandlerCarpenter Forestry for Minecraft Forestry:factory:1 Forestry TRUE 65 81 5
53 forestry.factory.recipes.nei.NEIHandlerCentrifuge Forestry for Minecraft Forestry:factory:2 Forestry TRUE 65 81 5
54 forestry.factory.recipes.nei.NEIHandlerFabricator Forestry for Minecraft Forestry:factory2 Forestry TRUE
55 forestry.factory.recipes.nei.NEIHandlerFermenter Forestry for Minecraft Forestry:factory:3 Forestry TRUE 65 81 5
56 forestry.factory.recipes.nei.NEIHandlerMoistener Forestry for Minecraft Forestry:factory:4 Forestry TRUE 68 84 5
57 forestry.factory.recipes.nei.NEIHandlerSqueezer Forestry for Minecraft Forestry:factory:5 Forestry TRUE 68 84 5
58 forestry.factory.recipes.nei.NEIHandlerStill Forestry for Minecraft Forestry:factory:6 Forestry TRUE 65 81 5
59 net.bdew.neiaddons.forestry.bees.BeeBreedingHandler Forestry for Minecraft Forestry:beeQueenGE Forestry TRUE 65 5
60 net.bdew.neiaddons.forestry.bees.BeeProduceHandler Forestry for Minecraft Forestry:beeQueenGE Forestry TRUE 65 5
61 net.bdew.neiaddons.forestry.butterflies.ButterflyBreedingHandler Forestry for Minecraft Forestry:butterflyGE Forestry TRUE
@@ -106,6 +106,8 @@ nei.options.keys.gui.hide_bookmarks=Toggle Bookmark Panel Visibility
nei.options.keys.gui.overlay=Overlay Recipe
nei.options.keys.gui.overlay_hide=Hide Overlay Recipe
nei.options.keys.gui.overlay_use=Use Overlay Recipe
nei.options.keys.gui.getprevioussearch=Previous Search
nei.options.keys.gui.getnextsearch=Next Search
nei.options.keys.world=World
nei.options.keys.world.chunkoverlay=Chunk Boundary Overlay
nei.options.keys.world.moboverlay=Mob Spawn Overlay
@@ -144,6 +146,9 @@ nei.options.inventory.saveCurrentRecipeInBookmarksEnabled.false=Disabled
nei.options.inventory.useNBTInBookmarks=Use NBT in Bookmarks
nei.options.inventory.useNBTInBookmarks.true=Yes
nei.options.inventory.useNBTInBookmarks.false=No
nei.options.inventory.bookmarksAnimationEnabled=REI Style Animation in Bookmarks
nei.options.inventory.bookmarksAnimationEnabled.true=Yes
nei.options.inventory.bookmarksAnimationEnabled.false=No
nei.options.inventory.showRecipeMarker=Show Recipe Marker
nei.options.inventory.showRecipeMarker.true=Yes
nei.options.inventory.showRecipeMarker.false=No
@@ -156,6 +161,9 @@ nei.options.inventory.creative_tab_style.false=JEI
nei.options.inventory.ignore_potion_overlap=Ignore overlap with potion effect HUD
nei.options.inventory.ignore_potion_overlap.true=Yes
nei.options.inventory.ignore_potion_overlap.false=No
nei.options.inventory.optimize_gui_overlap_computation=Optimize computation for GUI overlap
nei.options.inventory.optimize_gui_overlap_computation.true=Yes
nei.options.inventory.optimize_gui_overlap_computation.false=No
nei.options.inventory.widgetsenabled.true=NEI Enabled
nei.options.inventory.widgetsenabled.false=NEI Disabled
nei.options.inventory.cheatmode.0=Recipe Mode
+22 -1
View File
@@ -8,6 +8,10 @@ nei.key.ctrl.mac=CMD
nei.bookmark.toggle=书签
nei.bookmark.toggle.tip=显示/隐藏书签页
nei.bookmark.viewmode.toggle.tip=切换书签栏浏览模式
nei.itempanel.quantity.default=一组
nei.itempanel.loading=物品列表加载中...
nei.enchant=附魔
nei.enchant.level=等级
@@ -66,7 +70,8 @@ nei.chat.rain.on=开启雨雪
nei.chat.rain.off=关闭雨雪
nei.chat.time=白天 %d. %d:00
nei.chat.give.noitem=没有此物品
nei.chat.recipe.error=加载合成表过程中出现错误.请查看log文件获取详细信息.
nei.chat.recipe.error=加载合成表过程中出现错误.请查看日志了解详情.
nei.chat.render.error=渲染物品过程中出现错误.请查看日志了解详情.
nei.options=NEI选项
nei.options.back=后退
@@ -94,8 +99,15 @@ nei.options.keys.gui.next_machine=下一机器
nei.options.keys.gui.prev_machine=上一机器
nei.options.keys.gui.search=跳转到搜索框
nei.options.keys.gui.bookmark=添加书签
nei.options.keys.gui.bookmark_recipe=添加带有合成表的书签
nei.options.keys.gui.bookmark_count=添加带有数量的书签
nei.options.keys.gui.bookmark_recipe_count=添加带有合成表和数量的书签
nei.options.keys.gui.hide_bookmarks=显示/隐藏书签页
nei.options.keys.gui.overlay=提取合成表至合成栏/工作台
nei.options.keys.gui.overlay_hide=隐藏覆盖合成表
nei.options.keys.gui.overlay_use=使用覆盖合成表
nei.options.keys.gui.getprevioussearch=上一个搜索
nei.options.keys.gui.getnextsearch=下一个搜索
nei.options.keys.world=世界
nei.options.keys.world.chunkoverlay=区块(chunks)边界显示
nei.options.keys.world.moboverlay=刷怪区域显示
@@ -134,12 +146,21 @@ nei.options.inventory.saveCurrentRecipeInBookmarksEnabled.false=禁用
nei.options.inventory.useNBTInBookmarks=在书签中启用NBT
nei.options.inventory.useNBTInBookmarks.true=是
nei.options.inventory.useNBTInBookmarks.false=否
nei.options.inventory.bookmarksAnimationEnabled=REI风格书签动画
nei.options.inventory.bookmarksAnimationEnabled.true=是
nei.options.inventory.bookmarksAnimationEnabled.false=否
nei.options.inventory.showRecipeMarker=在书签栏显示合成产物标记
nei.options.inventory.showRecipeMarker.true=是
nei.options.inventory.showRecipeMarker.false=否
nei.options.inventory.showItemQuantityWidget=显示物品数量栏(右下角)
nei.options.inventory.showItemQuantityWidget.true=是
nei.options.inventory.showItemQuantityWidget.false=否
nei.options.inventory.creative_tab_style=创造模式/JEI标签页
nei.options.inventory.creative_tab_style.true=创造模式
nei.options.inventory.creative_tab_style.false=JEI
nei.options.inventory.ignore_potion_overlap=忽略书签与药水效果重叠
nei.options.inventory.ignore_potion_overlap.true=忽略
nei.options.inventory.ignore_potion_overlap.false=规避
nei.options.inventory.widgetsenabled.true=激活NEI
nei.options.inventory.widgetsenabled.false=禁用NEI
nei.options.inventory.cheatmode.0=合成模式
+3 -3
View File
@@ -1,7 +1,7 @@
{
"repo": "https://github.com/GTNewHorizons/CodeChickenLib/releases/download/1.1.5.3/",
"file": "CodeChickenLib-1.7.10-1.1.5.3.jar",
"dev": "CodeChickenLib-1.7.10-1.1.5.3-dev.jar",
"repo": "https://github.com/GTNewHorizons/CodeChickenLib/releases/download/1.1.5.6/",
"file": "CodeChickenLib-1.7.10-1.1.5.6.jar",
"dev": "CodeChickenLib-1.7.10-1.1.5.6-dev.jar",
"class": "codechicken.lib.asm.ASMHelper",
"coreLib": true
}