mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-16 18:54:45 +00:00
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
336c7dc621 | ||
|
|
2130a47f6f | ||
|
|
73b492b0e3 | ||
|
|
efa69f31b6 | ||
|
|
95b437e5c9 | ||
|
|
afe3c54c29 | ||
|
|
2cab09e91b | ||
|
|
4b4ab434c0 | ||
|
|
9d108b21f9 | ||
|
|
2302dac5c0 | ||
|
|
7c2fb2df5f | ||
|
|
14aa3728ca |
No files matched your search
@@ -0,0 +1,44 @@
|
||||
* text eol=lf
|
||||
|
||||
*.[jJ][aA][rR] binary
|
||||
|
||||
*.[pP][nN][gG] binary
|
||||
*.[jJ][pP][gG] binary
|
||||
*.[jJ][pP][eE][gG] binary
|
||||
*.[gG][iI][fF] binary
|
||||
*.[tT][iI][fF] binary
|
||||
*.[tT][iI][fF][fF] binary
|
||||
*.[iI][cC][oO] binary
|
||||
*.[sS][vV][gG] text
|
||||
*.[eE][pP][sS] binary
|
||||
*.[xX][cC][fF] binary
|
||||
|
||||
*.[kK][aA][rR] binary
|
||||
*.[mM]4[aA] binary
|
||||
*.[mM][iI][dD] binary
|
||||
*.[mM][iI][dD][iI] binary
|
||||
*.[mM][pP]3 binary
|
||||
*.[oO][gG][gG] binary
|
||||
*.[rR][aA] binary
|
||||
|
||||
*.7[zZ] binary
|
||||
*.[gG][zZ] binary
|
||||
*.[tT][aA][rR] binary
|
||||
*.[tT][gG][zZ] binary
|
||||
*.[zZ][iI][pP] binary
|
||||
|
||||
*.[tT][cC][nN] binary
|
||||
*.[sS][oO] binary
|
||||
*.[dD][lL][lL] binary
|
||||
*.[dD][yY][lL][iI][bB] binary
|
||||
*.[pP][sS][dD] binary
|
||||
*.[tT][tT][fF] binary
|
||||
*.[oO][tT][fF] binary
|
||||
|
||||
*.[pP][aA][tT][cC][hH] -text
|
||||
|
||||
*.[bB][aA][tT] text eol=crlf
|
||||
*.[cC][mM][dD] text eol=crlf
|
||||
*.[pP][sS]1 text eol=crlf
|
||||
|
||||
*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary
|
||||
+308
-136
@@ -1,13 +1,17 @@
|
||||
//version: 1660899027
|
||||
//version: 1667597057
|
||||
/*
|
||||
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 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,9 @@ buildscript {
|
||||
name 'Scala CI dependencies'
|
||||
url 'https://repo1.maven.org/maven2/'
|
||||
}
|
||||
maven {
|
||||
name 'jitpack'
|
||||
url 'https://jitpack.io'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.7'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2.11'
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
@@ -49,17 +54,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 +108,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 +133,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 +246,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"
|
||||
]
|
||||
@@ -256,16 +279,16 @@ minecraft {
|
||||
|
||||
if (replaceGradleTokenInFile) {
|
||||
replaceIn replaceGradleTokenInFile
|
||||
if(gradleTokenModId) {
|
||||
if (gradleTokenModId) {
|
||||
replace gradleTokenModId, modId
|
||||
}
|
||||
if(gradleTokenModName) {
|
||||
if (gradleTokenModName) {
|
||||
replace gradleTokenModName, modName
|
||||
}
|
||||
if(gradleTokenVersion) {
|
||||
if (gradleTokenVersion) {
|
||||
replace gradleTokenVersion, modVersion
|
||||
}
|
||||
if(gradleTokenGroupName) {
|
||||
if (gradleTokenGroupName) {
|
||||
replace gradleTokenGroupName, modGroup
|
||||
}
|
||||
}
|
||||
@@ -274,7 +297,7 @@ minecraft {
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
|
||||
if(developmentEnvironmentUserName) {
|
||||
if (developmentEnvironmentUserName) {
|
||||
args("--username", developmentEnvironmentUserName)
|
||||
}
|
||||
}
|
||||
@@ -285,7 +308,7 @@ minecraft {
|
||||
}
|
||||
}
|
||||
|
||||
if(file('addon.gradle').exists()) {
|
||||
if (file('addon.gradle').exists()) {
|
||||
apply from: 'addon.gradle'
|
||||
}
|
||||
|
||||
@@ -302,35 +325,23 @@ 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'
|
||||
}
|
||||
maven {
|
||||
url 'https://jitpack.io'
|
||||
name = "GTNH Maven"
|
||||
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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')
|
||||
annotationProcessor('org.spongepowered:mixin:0.8.5-GTNH:processor')
|
||||
}
|
||||
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'
|
||||
}
|
||||
compile('com.github.GTNewHorizons:SpongeMixins:1.5.0')
|
||||
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
|
||||
compile('com.gtnewhorizon:gtnhmixins:2.0.1')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,13 +353,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 +412,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 +440,7 @@ afterEvaluate {
|
||||
}
|
||||
|
||||
runClient {
|
||||
if(developmentEnvironmentUserName) {
|
||||
if (developmentEnvironmentUserName) {
|
||||
arguments += [
|
||||
"--username",
|
||||
developmentEnvironmentUserName
|
||||
@@ -465,7 +481,7 @@ processResources {
|
||||
"modName": modName
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
if (usesMixins.toBoolean()) {
|
||||
from refMap
|
||||
}
|
||||
|
||||
@@ -478,31 +494,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 +568,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 +591,11 @@ task apiJar(type: Jar) {
|
||||
}
|
||||
|
||||
artifacts {
|
||||
if(!noPublishedSources) {
|
||||
if (!noPublishedSources) {
|
||||
archives sourcesJar
|
||||
}
|
||||
archives devJar
|
||||
if(apiPackage) {
|
||||
if (apiPackage) {
|
||||
archives apiJar
|
||||
}
|
||||
}
|
||||
@@ -597,10 +613,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 +631,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 +664,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", "version", "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 +800,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 +841,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 +864,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 +890,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 +912,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 +922,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 +980,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 +997,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 +1012,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 +1054,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 +1094,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
|
||||
}
|
||||
@@ -58,3 +58,6 @@ 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
|
||||
|
||||
curseForgeProjectId = 358228
|
||||
modrinthProjectId = iNPc3Onu
|
||||
@@ -1,76 +0,0 @@
|
||||
package codechicken.nei;
|
||||
|
||||
import static codechicken.nei.ItemsGrid.SLOT_SIZE;
|
||||
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class AnimatedItemStack {
|
||||
|
||||
private static final int steep = 10;
|
||||
private static final float scaleSpeed = 0.1f;
|
||||
|
||||
private int lastPosX = -1;
|
||||
private int lastPosY = -1;
|
||||
private float currentScale = 0;
|
||||
private final boolean doMoveAnim;
|
||||
private final boolean doPopAnim;
|
||||
|
||||
public ItemStack itemStack;
|
||||
|
||||
public AnimatedItemStack(ItemStack itemStack, boolean doMoveAnim, boolean doPopAnim) {
|
||||
this.itemStack = itemStack;
|
||||
this.doMoveAnim = doMoveAnim;
|
||||
this.doPopAnim = doPopAnim;
|
||||
}
|
||||
|
||||
public void drawItem(int x, int y) {
|
||||
drawItem(x, y, false, null, false);
|
||||
}
|
||||
|
||||
public void drawItem(int x, int y, boolean smallAmount, String stackSize, boolean blockMoveAnimOnce) {
|
||||
if (NEIClientConfig.areBookmarksAnimated()) {
|
||||
if (doPopAnim && currentScale < 1) {
|
||||
drawPoppingItem(x, y, smallAmount, stackSize);
|
||||
return;
|
||||
}
|
||||
if (doMoveAnim && (lastPosX != x || lastPosY != y) && !blockMoveAnimOnce) {
|
||||
drawMovingItem(x, y, smallAmount, stackSize);
|
||||
return;
|
||||
}
|
||||
}
|
||||
currentScale = 1;
|
||||
lastPosX = x;
|
||||
lastPosY = y;
|
||||
GuiContainerManager.drawItem(x, y, itemStack, smallAmount, stackSize);
|
||||
}
|
||||
|
||||
private void drawPoppingItem(int x, int y, boolean smallAmount, String stackSize) {
|
||||
currentScale += scaleSpeed;
|
||||
GL11.glScalef(currentScale, currentScale, currentScale); // push & pop matrix crashes the game
|
||||
GuiContainerManager.drawItem(
|
||||
(int) ((x + (SLOT_SIZE / 2 - currentScale * SLOT_SIZE / 2)) / currentScale),
|
||||
(int) ((y + (SLOT_SIZE / 2 - currentScale * SLOT_SIZE / 2)) / currentScale),
|
||||
itemStack,
|
||||
smallAmount,
|
||||
stackSize);
|
||||
GL11.glScalef(1 / currentScale, 1 / currentScale, 1 / currentScale);
|
||||
}
|
||||
|
||||
private void drawMovingItem(int x, int y, boolean smallAmount, String stackSize) {
|
||||
if (lastPosX != -1 && lastPosY != -1) {
|
||||
int xDiff = x - lastPosX;
|
||||
int yDiff = y - lastPosY;
|
||||
int moveX = xDiff / steep + ((xDiff % steep == 0) ? 0 : (xDiff > 0 ? 1 : -1));
|
||||
int moveY = yDiff / steep + ((yDiff % steep == 0) ? 0 : (yDiff > 0 ? 1 : -1));
|
||||
GuiContainerManager.drawItem(lastPosX + moveX, lastPosY + moveY, itemStack, smallAmount, stackSize);
|
||||
lastPosX = lastPosX + moveX;
|
||||
lastPosY = lastPosY + moveY;
|
||||
} else {
|
||||
lastPosX = x;
|
||||
lastPosY = y;
|
||||
GuiContainerManager.drawItem(x, y, itemStack, smallAmount, stackSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package codechicken.nei;
|
||||
|
||||
import static codechicken.lib.gui.GuiDraw.*;
|
||||
import static codechicken.nei.NEIClientUtils.*;
|
||||
import static codechicken.lib.gui.GuiDraw.drawRect;
|
||||
import static codechicken.lib.gui.GuiDraw.getMousePosition;
|
||||
import static codechicken.nei.NEIClientUtils.translate;
|
||||
|
||||
import codechicken.core.CommonUtils;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
@@ -26,10 +27,10 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
@@ -49,9 +50,6 @@ public class BookmarkPanel extends PanelWidget {
|
||||
protected List<BookmarkGrid> namespaces = new ArrayList<>();
|
||||
protected int activeNamespaceIndex = 0;
|
||||
|
||||
private BookmarkStackMeta draggedStackMeta;
|
||||
private int draggedStackOriginIndex = -1;
|
||||
|
||||
protected static class BookmarkStackMeta {
|
||||
public int factor;
|
||||
public BookmarkRecipeId recipeId;
|
||||
@@ -73,8 +71,11 @@ public class BookmarkPanel extends PanelWidget {
|
||||
|
||||
protected 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;
|
||||
@@ -222,24 +223,23 @@ public class BookmarkPanel extends PanelWidget {
|
||||
return metadata.get(idx);
|
||||
}
|
||||
|
||||
public void addItem(ItemStack stackA, BookmarkStackMeta meta, boolean doPopAnim) {
|
||||
addRealItem(stackA, true, doPopAnim);
|
||||
metadata.add(meta);
|
||||
onGridChanged();
|
||||
public void addItem(ItemStack stackA, BookmarkStackMeta meta) {
|
||||
addItem(stackA, meta, true);
|
||||
}
|
||||
|
||||
public void addItem(ItemStack stackA, BookmarkStackMeta meta, int index) {
|
||||
if (index == -1) {
|
||||
addItem(stackA, meta, true);
|
||||
return;
|
||||
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);
|
||||
}
|
||||
addRealItem(index, stackA, true, true);
|
||||
metadata.add(index, meta);
|
||||
|
||||
onGridChanged();
|
||||
}
|
||||
|
||||
public void replaceItem(int idx, ItemStack stack) {
|
||||
setRealItem(idx, stack, true, true);
|
||||
realItems.set(idx, stack);
|
||||
onGridChanged();
|
||||
}
|
||||
|
||||
@@ -266,6 +266,7 @@ public class BookmarkPanel extends PanelWidget {
|
||||
}
|
||||
|
||||
protected boolean removeItem(int idx) {
|
||||
animation.remove(getItem(idx));
|
||||
realItems.remove(idx);
|
||||
metadata.remove(idx);
|
||||
onGridChanged();
|
||||
@@ -330,22 +331,36 @@ public class BookmarkPanel extends PanelWidget {
|
||||
|| LayoutManager.bookmarkPanel.sortedStackIndex != idx) {
|
||||
final ItemStack stack = getItem(idx);
|
||||
final BookmarkStackMeta meta = getMetadata(idx);
|
||||
final String stackSize = meta.factor < 0 || meta.fluidDisplay ? "" : String.valueOf(stack.stackSize);
|
||||
|
||||
realItems
|
||||
.get(idx)
|
||||
.drawItem(
|
||||
rect.x + 1,
|
||||
rect.y + 1,
|
||||
true,
|
||||
meta.factor < 0 || meta.fluidDisplay ? "" : String.valueOf(stack.stackSize),
|
||||
draggedStack == null);
|
||||
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 {
|
||||
|
||||
if (meta.recipeId != null && !meta.ingredient && NEIClientConfig.showRecipeMarker()) {
|
||||
drawRecipeMarker(rect.x, rect.y, GuiContainerManager.getFontRenderer(stack));
|
||||
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;
|
||||
@@ -422,26 +437,12 @@ public class BookmarkPanel extends PanelWidget {
|
||||
addOrRemoveItem(stackA, null, null, false, false);
|
||||
}
|
||||
|
||||
public void addOrRemoveItem(ItemStack stackA, int index) {
|
||||
addOrRemoveItem(stackA, null, null, false, false, index);
|
||||
}
|
||||
|
||||
public void addOrRemoveItem(
|
||||
ItemStack stackover,
|
||||
final String handlerName,
|
||||
final List<PositionedStack> ingredients,
|
||||
boolean saveIngredients,
|
||||
boolean saveStackSize) {
|
||||
addOrRemoveItem(stackover, handlerName, ingredients, saveIngredients, saveStackSize, -1);
|
||||
}
|
||||
|
||||
public void addOrRemoveItem(
|
||||
ItemStack stackover,
|
||||
final String handlerName,
|
||||
final List<PositionedStack> ingredients,
|
||||
boolean saveIngredients,
|
||||
boolean saveStackSize,
|
||||
int addIndex) {
|
||||
loadBookmarksIfNeeded();
|
||||
|
||||
final Point mousePos = getMousePosition();
|
||||
@@ -491,8 +492,7 @@ public class BookmarkPanel extends PanelWidget {
|
||||
recipeId != null ? recipeId.copy() : null,
|
||||
(saveStackSize ? 1 : -1) * count,
|
||||
true,
|
||||
nbTag.hasKey("gtFluidName")),
|
||||
addIndex);
|
||||
nbTag.hasKey("gtFluidName")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -502,8 +502,7 @@ public class BookmarkPanel extends PanelWidget {
|
||||
recipeId,
|
||||
(saveStackSize ? 1 : -1) * nbTagA.getInteger("Count"),
|
||||
false,
|
||||
nbTagA.hasKey("gtFluidName")),
|
||||
addIndex);
|
||||
nbTagA.hasKey("gtFluidName")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -895,8 +894,8 @@ public class BookmarkPanel extends PanelWidget {
|
||||
|
||||
@Override
|
||||
public void mouseDragged(int mousex, int mousey, int button, long heldTime) {
|
||||
// legacy sort
|
||||
if (button == 0 && NEIClientUtils.shiftKey() && mouseDownSlot >= 0 && draggedStack == null) {
|
||||
|
||||
if (button == 0 && NEIClientUtils.shiftKey() && mouseDownSlot >= 0) {
|
||||
ItemPanelSlot mouseOverSlot = getSlotMouseOver(mousex, mousey);
|
||||
|
||||
if (sortedStackIndex == -1) {
|
||||
@@ -915,17 +914,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, true);
|
||||
hoverGrid.addItem(stack, meta, false);
|
||||
|
||||
sortedNamespaceIndex = activeNamespaceIndex;
|
||||
sortedStackIndex = hoverGrid.indexOf(stack, meta.recipeId);
|
||||
@@ -967,106 +961,33 @@ public class BookmarkPanel extends PanelWidget {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mouseDownSlot >= 0
|
||||
&& draggedStack == null
|
||||
&& NEIClientUtils.getHeldItem() == null
|
||||
&& NEIClientConfig.hasSMPCounterPart()) {
|
||||
ItemPanelSlot mouseOverSlot = getSlotMouseOver(mousex, mousey);
|
||||
|
||||
if (mouseOverSlot == null || mouseOverSlot.slotIndex != mouseDownSlot || heldTime > 500) {
|
||||
draggedStack = getDraggedStackWithQuantity(mouseDownSlot);
|
||||
draggedStackMeta = ((BookmarkGrid) grid).getMetadata(mouseDownSlot);
|
||||
draggedStackOriginIndex = mouseDownSlot;
|
||||
((BookmarkGrid) grid).removeItem(mouseDownSlot);
|
||||
saveBookmarks();
|
||||
fixCountOfNamespaces();
|
||||
mouseDownSlot = -1;
|
||||
}
|
||||
}
|
||||
super.mouseDragged(mousex, mousey, button, heldTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
int mouseX = getMousePosition().x;
|
||||
int mouseY = getMousePosition().y;
|
||||
if (draggedStack != null) {
|
||||
|
||||
if (!contains(mouseX, mouseY)) {
|
||||
if (sortedStackIndex != -1 && sortedStackIndex < grid.realItems.size()) {
|
||||
((BookmarkGrid) grid).removeItem(sortedStackIndex);
|
||||
sortedStackIndex = -1;
|
||||
}
|
||||
} else {
|
||||
ItemPanelSlot mouseOverSlot = getSlotMouseOver(mouseX, mouseY);
|
||||
if (sortedStackIndex == -1) {
|
||||
sortedNamespaceIndex = activeNamespaceIndex;
|
||||
if (mouseOverSlot != null) {
|
||||
sortedStackIndex = mouseOverSlot.slotIndex;
|
||||
} else {
|
||||
sortedStackIndex = grid.size();
|
||||
}
|
||||
// dummy item
|
||||
addOrRemoveItem(
|
||||
new ItemStack(Items.paper).setStackDisplayName("this is a dummy item"), sortedStackIndex);
|
||||
} else if (mouseOverSlot != null && mouseOverSlot.slotIndex != sortedStackIndex) {
|
||||
final BookmarkGrid sortedGrid = namespaces.get(sortedNamespaceIndex);
|
||||
if (sortedStackIndex >= grid.size()) sortedStackIndex = grid.size() - 1;
|
||||
if (sortedGrid.getViewMode() == BookmarkViewMode.DEFAULT) {
|
||||
sortedGrid.moveItem(sortedStackIndex, mouseOverSlot.slotIndex);
|
||||
sortedStackIndex = mouseOverSlot.slotIndex;
|
||||
} else if (sortedGrid.getViewMode() == BookmarkViewMode.TODO_LIST) {
|
||||
final ItemStack stack = sortedGrid.getItem(sortedStackIndex);
|
||||
final BookmarkStackMeta meta = sortedGrid.getMetadata(sortedStackIndex);
|
||||
final boolean isIngredient = sortedStackIndex > 0
|
||||
&& meta.recipeId != null
|
||||
&& meta.ingredient
|
||||
&& meta.recipeId.equals(sortedGrid.getRecipeId(sortedStackIndex - 1));
|
||||
|
||||
if (!isIngredient) {
|
||||
mouseOverSlot = getSlotMouseOver(grid.marginLeft + grid.paddingLeft, mouseY);
|
||||
|
||||
if (mouseOverSlot != null && sortedStackIndex != mouseOverSlot.slotIndex) {
|
||||
sortedGrid.moveItem(sortedStackIndex, mouseOverSlot.slotIndex);
|
||||
sortedStackIndex = sortedGrid.indexOf(stack, meta.recipeId);
|
||||
}
|
||||
|
||||
} else if (meta.recipeId != null
|
||||
&& sortedGrid.getMetadata(mouseOverSlot.slotIndex).ingredient
|
||||
&& meta.recipeId.equals(sortedGrid.getRecipeId(mouseOverSlot.slotIndex))) {
|
||||
sortedGrid.moveItem(sortedStackIndex, mouseOverSlot.slotIndex);
|
||||
sortedStackIndex = sortedGrid.indexOf(stack, meta.recipeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
super.update();
|
||||
}
|
||||
|
||||
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
|
||||
public void postDraw(int mousex, int mousey) {
|
||||
|
||||
// legacy sort
|
||||
if (sortedStackIndex != -1 && shiftKey() && draggedStack == null) {
|
||||
if (sortedStackIndex != -1) {
|
||||
GuiContainerManager.drawItems.zLevel += 100;
|
||||
GuiContainerManager.drawItem(
|
||||
mousex - 8,
|
||||
@@ -1079,6 +1000,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);
|
||||
}
|
||||
|
||||
@@ -1102,39 +1032,6 @@ public class BookmarkPanel extends PanelWidget {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean handleDraggedClick(int mouseX, int mouseY, int button) {
|
||||
if (contains(mouseX, mouseY)) {
|
||||
((BookmarkGrid) grid).removeItem(sortedStackIndex);
|
||||
if (draggedStackMeta != null) {
|
||||
((BookmarkGrid) grid).addItem(draggedStack, draggedStackMeta, sortedStackIndex);
|
||||
fixCountOfNamespaces();
|
||||
saveBookmarks();
|
||||
} else addOrRemoveItem(draggedStack, sortedStackIndex);
|
||||
sortedStackIndex = -1;
|
||||
draggedStack = null;
|
||||
draggedStackMeta = null;
|
||||
draggedStackOriginIndex = -1;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void restoreBookmark() {
|
||||
if (draggedStack != null && draggedStackOriginIndex != -1) {
|
||||
if (sortedStackIndex != -1) ((BookmarkGrid) grid).removeItem(sortedStackIndex);
|
||||
if (draggedStackMeta != null) {
|
||||
((BookmarkGrid) grid).addItem(draggedStack, draggedStackMeta, draggedStackOriginIndex);
|
||||
fixCountOfNamespaces();
|
||||
saveBookmarks();
|
||||
} else addOrRemoveItem(draggedStack, draggedStackOriginIndex);
|
||||
sortedStackIndex = -1;
|
||||
draggedStack = null;
|
||||
draggedStackMeta = null;
|
||||
draggedStackOriginIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(int mx, int my, List<String> tooltip) {
|
||||
|
||||
@@ -1148,7 +1045,8 @@ public class BookmarkPanel extends PanelWidget {
|
||||
|
||||
@Override
|
||||
public void mouseUp(int mousex, int mousey, int button) {
|
||||
if (sortedStackIndex != -1 && draggedStack == null) {
|
||||
if (sortedStackIndex != -1) {
|
||||
draggedStack = null;
|
||||
sortedNamespaceIndex = -1;
|
||||
sortedStackIndex = -1;
|
||||
mouseDownSlot = -1;
|
||||
@@ -1227,9 +1125,4 @@ public class BookmarkPanel extends PanelWidget {
|
||||
BGrid.replaceItem(slotIndex, StackInfo.loadFromNBT(nbTag));
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteDraggedMeta() {
|
||||
draggedStackMeta = null;
|
||||
draggedStackOriginIndex = -1;
|
||||
}
|
||||
}
|
||||
@@ -57,8 +57,7 @@ public class ItemPanel extends PanelWidget {
|
||||
public void refresh(GuiContainer gui) {
|
||||
|
||||
if (newItems != null) {
|
||||
realItems.clear();
|
||||
addRealItems(newItems, false, false);
|
||||
realItems = newItems;
|
||||
newItems = null;
|
||||
onGridChanged();
|
||||
}
|
||||
|
||||
@@ -9,9 +9,7 @@ import codechicken.nei.guihook.GuiContainerManager;
|
||||
import codechicken.nei.recipe.StackInfo;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
@@ -33,7 +31,7 @@ public class ItemsGrid {
|
||||
|
||||
protected int paddingLeft;
|
||||
|
||||
protected ArrayList<AnimatedItemStack> realItems = new ArrayList<>();
|
||||
protected ArrayList<ItemStack> realItems = new ArrayList<>();
|
||||
|
||||
protected int page;
|
||||
protected int perPage;
|
||||
@@ -51,27 +49,11 @@ public class ItemsGrid {
|
||||
protected boolean refreshBuffer = true;
|
||||
|
||||
public ArrayList<ItemStack> getItems() {
|
||||
return realItems.stream().map(e -> e.itemStack).collect(Collectors.toCollection(ArrayList::new));
|
||||
return realItems;
|
||||
}
|
||||
|
||||
public ItemStack getItem(int idx) {
|
||||
return realItems.get(idx).itemStack;
|
||||
}
|
||||
|
||||
protected void addRealItems(Collection<ItemStack> itemStack, boolean doMoveAnim, boolean doPopAnim) {
|
||||
itemStack.forEach(e -> addRealItem(e, doMoveAnim, doPopAnim));
|
||||
}
|
||||
|
||||
protected void addRealItem(ItemStack itemStack, boolean doMoveAnim, boolean doPopAnim) {
|
||||
realItems.add(new AnimatedItemStack(itemStack, doMoveAnim, doPopAnim));
|
||||
}
|
||||
|
||||
protected void addRealItem(int index, ItemStack itemStack, boolean doMoveAnim, boolean doPopAnim) {
|
||||
realItems.add(index, new AnimatedItemStack(itemStack, doMoveAnim, doPopAnim));
|
||||
}
|
||||
|
||||
protected void setRealItem(int index, ItemStack itemStack, boolean doMoveAnim, boolean doPopAnim) {
|
||||
realItems.set(index, new AnimatedItemStack(itemStack, doMoveAnim, doPopAnim));
|
||||
return realItems.get(idx);
|
||||
}
|
||||
|
||||
public int size() {
|
||||
@@ -171,8 +153,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();
|
||||
@@ -182,7 +168,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++) {
|
||||
@@ -335,7 +321,7 @@ public class ItemsGrid {
|
||||
}
|
||||
|
||||
protected void drawItem(Rectangle4i rect, int idx) {
|
||||
realItems.get(idx).drawItem(rect.x + 1, rect.y + 1);
|
||||
GuiContainerManager.drawItem(rect.x + 1, rect.y + 1, getItem(idx));
|
||||
}
|
||||
|
||||
public ItemPanelSlot getSlotMouseOver(int mousex, int mousey) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -274,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);
|
||||
@@ -540,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))
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack;
|
||||
public abstract class PanelWidget extends Widget {
|
||||
protected static final int PADDING = 2;
|
||||
|
||||
public static ItemStack draggedStack;
|
||||
public ItemStack draggedStack;
|
||||
public int mouseDownSlot = -1;
|
||||
|
||||
public Button pagePrev;
|
||||
@@ -240,30 +240,21 @@ public abstract class PanelWidget extends Widget {
|
||||
|
||||
@Override
|
||||
public boolean handleClickExt(int mouseX, int mouseY, int button) {
|
||||
if (draggedStack != null) {
|
||||
boolean succeed = ItemPanels.bookmarkPanel.handleDraggedClick(mouseX, mouseY, button)
|
||||
|| ItemPanels.itemPanel.handleDraggedClick(mouseX, mouseY, button);
|
||||
if (succeed) return true;
|
||||
|
||||
if (handleGUIContainerClick(draggedStack, mouseX, mouseY, button)) {
|
||||
if (draggedStack.stackSize == 0) {
|
||||
ItemPanels.bookmarkPanel.restoreBookmark();
|
||||
draggedStack = null;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
final GuiContainer gui = NEIClientUtils.getGuiContainer();
|
||||
if (mouseX < gui.guiLeft
|
||||
|| mouseY < gui.guiTop
|
||||
|| mouseX >= gui.guiLeft + gui.xSize
|
||||
|| mouseY >= gui.guiTop + gui.ySize) {
|
||||
ItemPanels.bookmarkPanel.deleteDraggedMeta();
|
||||
draggedStack = null;
|
||||
return true;
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
if (ItemPanels.bookmarkPanel.draggedStack != null) {
|
||||
return ItemPanels.bookmarkPanel.handleDraggedClick(mouseX, mouseY, button);
|
||||
}
|
||||
|
||||
if (NEIClientUtils.getHeldItem() != null) {
|
||||
final ItemStack draggedStack = NEIClientUtils.getHeldItem().copy();
|
||||
return handleGUIContainerClick(draggedStack, mouseX, mouseY, button);
|
||||
@@ -273,7 +264,28 @@ public abstract class PanelWidget extends Widget {
|
||||
}
|
||||
|
||||
protected boolean handleDraggedClick(int mouseX, int mouseY, int button) {
|
||||
return false;
|
||||
if (draggedStack == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (handleGUIContainerClick(draggedStack, mouseX, mouseY, button)) {
|
||||
|
||||
if (draggedStack.stackSize == 0) {
|
||||
draggedStack = null;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
final GuiContainer gui = NEIClientUtils.getGuiContainer();
|
||||
if (mouseX < gui.guiLeft
|
||||
|| mouseY < gui.guiTop
|
||||
|| mouseX >= gui.guiLeft + gui.xSize
|
||||
|| mouseY >= gui.guiTop + gui.ySize) {
|
||||
draggedStack = null;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean handleGUIContainerClick(final ItemStack draggedStack, int mouseX, int mouseY, int button) {
|
||||
|
||||
@@ -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.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")) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,,,,,,
|
||||
|
||||
|
@@ -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,,,,,,,,,,,
|
||||
|
||||
|
@@ -161,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
|
||||
|
||||
Reference in new issue
Block a user