Replace asm with api calls (#35)

* Update buildscript&dependencies

* Remove AE2 asm and use the new API instead

* Remove stack size limitation for ctrl+scroll, it's useful to bypass by other means anyway

* spotlessApply

* Use RFG Tags instead of token replacement

* Suppress deprecation via an annotation instead of IntelliJ magic comment

* Update dependencies.gradle

* Update dependencies.gradle
This commit is contained in:
Raven Szewczyk authored and GitHub committed 2023-05-28 22:44:59 +02:00
1 parent 0eb446cadc
commit 233f2460ac
42 files changed
+345 -588

No files matched your search

+101 -125
View File
@@ -1,4 +1,4 @@
//version: 1678003329
//version: 1684218858
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -6,29 +6,25 @@
*/
import com.diffplug.blowdryer.Blowdryer
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.gtnewhorizons.retrofuturagradle.ObfuscationAttribute
import com.gtnewhorizons.retrofuturagradle.mcp.ReobfuscatedJar
import com.gtnewhorizons.retrofuturagradle.minecraft.RunMinecraftTask
import com.gtnewhorizons.retrofuturagradle.util.Distribution
import com.matthewprenger.cursegradle.CurseArtifact
import com.matthewprenger.cursegradle.CurseRelation
import com.modrinth.minotaur.dependencies.ModDependency
import com.modrinth.minotaur.dependencies.VersionDependency
import cpw.mods.fml.relauncher.Side
import org.gradle.api.tasks.options.Option;
import org.gradle.internal.logging.text.StyledTextOutput.Style
import org.gradle.internal.logging.text.StyledTextOutputFactory
import org.gradle.internal.xml.XmlTransformer
import org.jetbrains.gradle.ext.*
import org.jetbrains.gradle.ext.Application
import org.jetbrains.gradle.ext.Gradle
import javax.inject.Inject
import java.nio.file.Files
import java.nio.file.Paths
import java.util.concurrent.TimeUnit
import java.util.zip.ZipEntry
import java.util.zip.ZipOutputStream
import javax.inject.Inject
buildscript {
repositories {
@@ -65,22 +61,26 @@ plugins {
id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false
id 'org.jetbrains.kotlin.kapt' version '1.8.0' apply false
id 'com.google.devtools.ksp' version '1.8.0-1.0.9' apply false
id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version ,unused, available for addon.gradle
id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
id 'com.palantir.git-version' version '0.13.0' apply false // 0.13.0 is the last jvm8 supporting version
id 'de.undercouch.download' version '5.3.0'
id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'com.palantir.git-version' version '3.0.0' apply false
id 'de.undercouch.download' version '5.4.0'
id 'com.github.gmazzo.buildconfig' version '3.1.0' apply false // Unused, available for addon.gradle
id 'com.diffplug.spotless' version '6.7.2' apply false
id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id 'com.gtnewhorizons.retrofuturagradle' version '1.2.3'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.14'
}
print("You might want to check out './gradlew :faq' if your build fails.\n")
boolean settingsupdated = verifySettingsGradle()
settingsupdated = verifyGitAttributes() || settingsupdated
if (settingsupdated)
throw new GradleException("Settings has been updated, please re-run task.")
if (project.file('.git/HEAD').isFile()) {
// In submodules, .git is a file pointing to the real git dir
if (project.file('.git/HEAD').isFile() || project.file('.git').isFile()) {
apply plugin: 'com.palantir.git-version'
}
@@ -132,7 +132,7 @@ propertyDefaultIfUnset("enableGenericInjection", false) // On by default for new
// this is meant to be set using the user wide property file. by default we do nothing.
propertyDefaultIfUnset("ideaOverrideBuildType", "") // Can be nothing, "gradle" or "idea"
project.extensions.add(Blowdryer, "Blowdryer", Blowdryer) // Make blowdryer available in "apply from:" scripts
project.extensions.add(com.diffplug.blowdryer.Blowdryer, "Blowdryer", com.diffplug.blowdryer.Blowdryer) // Make blowdryer available in "apply from:" scripts
if (!disableSpotless) {
apply plugin: 'com.diffplug.spotless'
apply from: Blowdryer.file('spotless.gradle')
@@ -160,6 +160,14 @@ java {
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
tasks.withType(ScalaCompile).configureEach {
options.encoding = "UTF-8"
}
pluginManager.withPlugin('org.jetbrains.kotlin.jvm') {
// If Kotlin is enabled in the project
kotlin {
@@ -193,6 +201,14 @@ configurations {
canBeConsumed = false
canBeResolved = false
}
create("devOnlyNonPublishable") {
description = "Runtime and compiletime dependencies that are not published alongside the jar (compileOnly + runtimeOnlyNonPublishable)"
canBeConsumed = false
canBeResolved = false
}
compileOnly.extendsFrom(devOnlyNonPublishable)
runtimeOnlyNonPublishable.extendsFrom(devOnlyNonPublishable)
}
if (enableModernJavaSyntax.toBoolean()) {
@@ -206,6 +222,8 @@ if (enableModernJavaSyntax.toBoolean()) {
dependencies {
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0'
// workaround for https://github.com/bsideup/jabel/issues/174
annotationProcessor 'net.java.dev.jna:jna-platform:5.13.0'
compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') {
transitive = false // We only care about the 1 annotation class
}
@@ -391,14 +409,12 @@ minecraft {
username = developmentEnvironmentUserName.toString()
lwjgl3Version = "3.3.2-SNAPSHOT"
lwjgl3Version = "3.3.2"
// Enable assertions in the current mod
extraRunJvmArguments.add("-ea:${modGroup}")
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
extraTweakClasses.add("org.spongepowered.asm.launch.MixinTweaker")
if (usesMixinDebug.toBoolean()) {
extraRunJvmArguments.addAll([
"-Dmixin.debug.countInjections=true",
@@ -513,14 +529,6 @@ repositories {
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
}
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
if (usesMixinDebug.toBoolean()) {
maven {
name = "Fabric Maven"
url = "https://maven.fabricmc.net/"
}
}
}
maven {
name 'sonatype'
url 'https://oss.sonatype.org/content/repositories/snapshots/'
@@ -559,29 +567,50 @@ repositories {
}
}
def mixinProviderGroup = "io.github.legacymoddingmc"
def mixinProviderModule = "unimixins"
def mixinProviderVersion = "0.1.7.1"
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
ext.mixinProviderSpec = mixinProviderSpec
dependencies {
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('com.gtnewhorizon:gtnhmixins:2.1.13:processor')
annotationProcessor(mixinProviderSpec)
if (usesMixinDebug.toBoolean()) {
runtimeOnlyNonPublishable('org.jetbrains:intellij-fernflower:1.2.1.16')
}
}
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
implementation('com.gtnewhorizon:gtnhmixins:2.1.13')
if (usesMixins.toBoolean()) {
implementation(mixinProviderSpec)
} else if (forceEnableMixins.toBoolean()) {
runtimeOnlyNonPublishable(mixinProviderSpec)
}
}
pluginManager.withPlugin('org.jetbrains.kotlin.kapt') {
if (usesMixins.toBoolean()) {
dependencies {
kapt('com.gtnewhorizon:gtnhmixins:2.1.13:processor')
kapt(mixinProviderSpec)
}
}
}
// Replace old mixin mods with unimixins
// https://docs.gradle.org/8.0.2/userguide/resolution_rules.html#sec:substitution_with_classifier
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute module('com.gtnewhorizon:gtnhmixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('com.github.GTNewHorizons:Mixingasm') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier")
}
}
apply from: 'dependencies.gradle'
def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'
@@ -695,13 +724,13 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
}
dependencies {
def lwjgl3ifyVersion = '1.1.35'
def lwjgl3ifyVersion = '1.3.5'
def asmVersion = '9.4'
if (modId != 'lwjgl3ify') {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.0.40')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.13')
}
java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false}
@@ -775,7 +804,7 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
public boolean setEnableHotswap(boolean enable) { enableHotswap = enable }
@Inject
public RunHotswappableMinecraftTask(Side side, String superTask, org.gradle.api.invocation.Gradle gradle) {
public RunHotswappableMinecraftTask(Distribution side, String superTask, org.gradle.api.invocation.Gradle gradle) {
super(side, gradle)
this.lwjglVersion = 3
@@ -784,7 +813,7 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
this.extraJvmArgs.addAll(project.provider(() -> enableHotswap ? project.hotswapJvmArgs : []))
this.classpath(project.java17PatchDependenciesCfg)
if (side == Side.CLIENT) {
if (side == Distribution.CLIENT) {
this.classpath(project.minecraftTasks.lwjgl3Configuration)
}
// Use a raw provider instead of map to not create a dependency on the task
@@ -793,14 +822,22 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
!file.path.contains("2.9.4-nightly-20150209") // Remove lwjgl2
}
this.classpath(project.java17DependenciesCfg)
}
if (!(project.usesMixins.toBoolean() || project.forceEnableMixins.toBoolean())) {
this.extraArgs.addAll("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
public void setup(Project project) {
super.setup(project)
if (project.usesMixins.toBoolean()) {
this.extraJvmArgs.addAll(project.provider(() -> {
def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec))
mixinCfg.canBeConsumed = false
mixinCfg.transitive = false
enableHotswap ? ["-javaagent:" + mixinCfg.singleFile.absolutePath] : []
}))
}
}
}
def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Side.CLIENT, "runClient")
def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Distribution.CLIENT, "runClient")
runClient17Task.configure {
setup(project)
group = "Modded Minecraft"
@@ -811,7 +848,7 @@ runClient17Task.configure {
userUUID = minecraft.userUUID
}
def runServer17Task = tasks.register("runServer17", RunHotswappableMinecraftTask, Side.SERVER, "runServer")
def runServer17Task = tasks.register("runServer17", RunHotswappableMinecraftTask, Distribution.DEDICATED_SERVER, "runServer")
runServer17Task.configure {
setup(project)
group = "Modded Minecraft"
@@ -852,11 +889,6 @@ tasks.named("jar", Jar).configure {
}
if (usesShadowedDependencies.toBoolean()) {
tasks.register('relocateShadowJar', ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = modGroup + ".shadow"
enabled = relocateShadowedDependencies.toBoolean()
}
tasks.named("shadowJar", ShadowJar).configure {
manifest {
attributes(getManifestAttributes())
@@ -872,7 +904,8 @@ if (usesShadowedDependencies.toBoolean()) {
]
archiveClassifier.set('dev')
if (relocateShadowedDependencies.toBoolean()) {
dependsOn(relocateShadowJar)
relocationPrefix = modGroup + ".shadow"
enableRelocation = true
}
}
configurations.runtimeElements.outgoing.artifacts.clear()
@@ -1006,6 +1039,7 @@ idea {
}
compiler.javac {
afterEvaluate {
javacAdditionalOptions = "-encoding utf8"
moduleJavacAdditionalOptions = [
(project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ')
]
@@ -1125,7 +1159,7 @@ if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) {
}
}
if (usesMixins.toBoolean()) {
addModrinthDep("required", "project", "gtnhmixins")
addModrinthDep("required", "project", "unimixins")
}
tasks.modrinth.dependsOn(build)
tasks.publish.dependsOn(tasks.modrinth)
@@ -1169,7 +1203,7 @@ if (curseForgeProjectId.size() != 0 && System.getenv("CURSEFORGE_TOKEN") != null
}
}
if (usesMixins.toBoolean()) {
addCurseForgeRelation("requiredDependency", "gtnhmixins")
addCurseForgeRelation("requiredDependency", "unimixins")
}
tasks.curseforge.dependsOn(build)
tasks.publish.dependsOn(tasks.curseforge)
@@ -1204,7 +1238,7 @@ def addCurseForgeRelation(String type, String name) {
// Updating
def buildscriptGradleVersion = "8.0.1"
def buildscriptGradleVersion = "8.1.1"
tasks.named('wrapper', Wrapper).configure {
gradleVersion = buildscriptGradleVersion
@@ -1236,6 +1270,21 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA
}
}
// If you want to add more cases to this task, implement them as arguments if total amount to print gets too large
tasks.register('faq') {
group = 'GTNH Buildscript'
description = 'Prints frequently asked questions about building a project'
doLast {
print("If your build fails to fetch dependencies, they might have been deleted and replaced by newer " +
"versions.\nCheck if the versions you try to fetch are still on the distributing sites.\n" +
"The links can be found in repositories.gradle and build.gradle:repositories, " +
"not build.gradle:buildscript.repositories - this one is for gradle plugin metadata.\n\n" +
"If your build fails to recognize the syntax of new Java versions, enable Jabel in your " +
"gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties.")
}
}
static URL availableBuildScriptUrl() {
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/build.gradle")
}
@@ -1373,7 +1422,7 @@ static int replaceParams(File file, Map<String, String> params) {
return 0
}
// Dependency Deobfuscation
// Dependency Deobfuscation (Deprecated, use the new RFG API documented in dependencies.gradle)
def deobf(String sourceURL) {
try {
@@ -1415,11 +1464,7 @@ def deobfMaven(String repoURL, String mavenDep) {
}
def deobfCurse(String curseDep) {
try {
return deobfMaven("https://www.cursemaven.com/", "curse.maven:$curseDep")
} catch (Exception ignored) {
out.style(Style.Failure).println("Failed to get $curseDep from cursemaven.")
}
return dependencies.rfg.deobf("curse.maven:$curseDep")
}
// The method above is to be preferred. Use this method if the filename is not at the end of the URL.
@@ -1427,34 +1472,7 @@ def deobf(String sourceURL, String rawFileName) {
String bon2Version = "2.5.1"
String fileName = URLDecoder.decode(rawFileName, "UTF-8")
String cacheDir = "$project.gradle.gradleUserHomeDir/caches"
String bon2Dir = "$cacheDir/forge_gradle/deobf"
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()) {
return files(deobfFile)
}
String mappingsVer
String remoteMappings = project.hasProperty('remoteMappings') ? project.remoteMappings : 'https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/'
if (remoteMappings) {
String id = "${forgeVersion.split("\\.")[3]}-$minecraftVersion"
String mappingsZIP = "$cacheDir/forge_gradle/maven_downloader/de/oceanlabs/mcp/mcp_snapshot_nodoc/$id/mcp_snapshot_nodoc-${id}.zip"
zipMappings(mappingsZIP, remoteMappings, bon2Dir)
mappingsVer = "snapshot_$id"
} else {
mappingsVer = "${channel}_$mappingsVersion"
}
download.run {
src "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/com/github/parker8283/BON2/$bon2Version-CUSTOM/BON2-$bon2Version-CUSTOM-all.jar"
dest bon2File
quiet true
overwrite false
}
download.run {
src sourceURL
@@ -1462,50 +1480,8 @@ def deobf(String sourceURL, String rawFileName) {
quiet true
overwrite false
}
exec {
commandLine 'java', '-jar', bon2File, '--inputJar', obfFile, '--outputJar', deobfFile, '--mcVer', minecraftVersion, '--mappingsVer', mappingsVer, '--notch'
workingDir bon2Dir
standardOutput = new FileOutputStream("${deobfFile}.log")
}
return files(deobfFile)
return dependencies.rfg.deobf(files(obfFile))
}
def zipMappings(String zipPath, String url, String bon2Dir) {
File zipFile = new File(zipPath)
if (zipFile.exists()) {
return
}
String fieldsCache = "$bon2Dir/data/fields.csv"
String methodsCache = "$bon2Dir/data/methods.csv"
download.run {
src "${url}fields.csv"
dest fieldsCache
quiet true
}
download.run {
src "${url}methods.csv"
dest methodsCache
quiet true
}
zipFile.getParentFile().mkdirs()
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))
zos.putNextEntry(new ZipEntry("fields.csv"))
Files.copy(Paths.get(fieldsCache), zos)
zos.closeEntry()
zos.putNextEntry(new ZipEntry("methods.csv"))
Files.copy(Paths.get(methodsCache), zos)
zos.closeEntry()
zos.close()
}
// Helper methods
def checkPropertyExists(String propertyName) {
+13 -13
View File
@@ -1,18 +1,18 @@
dependencies {
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-159-GTNH:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.3.32-GTNH:dev")
implementation("com.github.GTNewHorizons:Baubles:1.0.1.14:dev")
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.8.9.3:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-217-GTNH:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.3.53-GTNH:dev")
implementation("com.github.GTNewHorizons:Baubles:1.0.1.16:dev")
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.9.0:dev")
compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.0.70-gtnh:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.5.4-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:BuildCraftCompat:7.1.12:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:EnderIO:2.3.1.47:dev') {transitive=false}
compileOnly("com.github.GTNewHorizons:ForestryMC:4.4.14:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.41.264:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:GTplusplus:1.7.201:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.3.19-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.9.11-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.1.21-gtnh:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.5.5-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:BuildCraftCompat:7.1.14:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:EnderIO:2.4.17:dev') {transitive=false}
compileOnly("com.github.GTNewHorizons:ForestryMC:4.6.7:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.43.50:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:GTplusplus:1.9.16:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.4.3-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.9.23-GTNH:dev") { transitive = false }
compileOnly("com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev") { transitive = false }
compileOnly("curse.maven:thaumcraft-nei-plugin-225095:2241913") { transitive = false }
compileOnly("curse.maven:thermal-expansion-69163:2388759") { transitive = false }
+10 -7
View File
@@ -21,16 +21,19 @@ forgeVersion = 10.13.4.1614
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
developmentEnvironmentUserName = Developer
# Define a source file of your project with:
# Generate a class with String fields for the mod id, name, version and group name named with the fields below
generateGradleTokenClass = com.github.vfyjxf.nee.Tags
gradleTokenModId =
gradleTokenModName =
gradleTokenVersion = VERSION
gradleTokenGroupName =
# [DEPRECATED]
# Multiple source files can be defined here by providing a comma-seperated list: Class1.java,Class2.java,Class3.java
# public static final String VERSION = "GRADLETOKEN_VERSION";
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements
replaceGradleTokenInFile = NotEnoughEnergistics.java
gradleTokenModId =
gradleTokenModName =
gradleTokenVersion = GRADLETOKEN_VERSION
gradleTokenGroupName =
replaceGradleTokenInFile =
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
@@ -50,7 +53,7 @@ mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
coreModClass = asm.NEELoadingPlugin
coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+1
View File
@@ -1,4 +1,5 @@
// Add any additional repositories for your dependencies here
repositories {
mavenLocal()
}
@@ -7,18 +7,6 @@ import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTermi
import org.lwjgl.input.Keyboard;
import thaumicenergistics.client.gui.GuiKnowledgeInscriber;
import wanion.avaritiaddons.block.extremeautocrafter.GuiExtremeAutoCrafter;
import appeng.client.gui.implementations.GuiCraftingTerm;
import appeng.client.gui.implementations.GuiInterface;
import appeng.client.gui.implementations.GuiPatternTerm;
import appeng.client.gui.implementations.GuiPatternTermEx;
import codechicken.nei.NEIController;
import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;
import codechicken.nei.guihook.GuiContainerManager;
import codechicken.nei.guihook.IContainerInputHandler;
import com.github.vfyjxf.nee.client.GuiEventHandler;
import com.github.vfyjxf.nee.nei.NEECraftingHandler;
import com.github.vfyjxf.nee.nei.NEECraftingHelper;
@@ -29,7 +17,19 @@ import com.glodblock.github.client.gui.GuiFluidPatternExWireless;
import com.glodblock.github.client.gui.GuiFluidPatternTerminal;
import com.glodblock.github.client.gui.GuiFluidPatternTerminalEx;
import com.glodblock.github.client.gui.GuiFluidPatternWireless;
import appeng.client.gui.implementations.GuiCraftingTerm;
import appeng.client.gui.implementations.GuiInterface;
import appeng.client.gui.implementations.GuiPatternTerm;
import appeng.client.gui.implementations.GuiPatternTermEx;
import codechicken.nei.NEIController;
import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;
import codechicken.nei.guihook.GuiContainerManager;
import codechicken.nei.guihook.IContainerInputHandler;
import cpw.mods.fml.common.Loader;
import thaumicenergistics.client.gui.GuiKnowledgeInscriber;
import wanion.avaritiaddons.block.extremeautocrafter.GuiExtremeAutoCrafter;
public class NEINeeConfig implements IConfigureNEI {
@@ -32,7 +32,7 @@ public class NotEnoughEnergistics {
public static final String MODID = "neenergistics";
public static final String NAME = "NotEnoughEnergistics";
public static final String VERSION = "GRADLETOKEN_VERSION";
public static final String VERSION = Tags.VERSION;
public static final String DEPENDENCIES = "required-after:NotEnoughItems;required-after:appliedenergistics2@[rv3.beta.22,),[rv3.beta-22,),[rv3-beta.22,),[rv3-beta-22,);after:ae2wct;after:ae2fc";
public static final String GUI_FACTORY = "com.github.vfyjxf.nee.config.NEEConfigGuiFactory";
public static final Logger logger = LogManager.getLogger("NotEnoughEnergistics");
@@ -1,128 +0,0 @@
package com.github.vfyjxf.nee.asm;
import static com.github.vfyjxf.nee.nei.NEECraftingHandler.INPUT_KEY;
import static com.github.vfyjxf.nee.utils.GuiUtils.isPatternTerm;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import appeng.client.gui.implementations.GuiInterface;
import appeng.container.slot.SlotFake;
import codechicken.nei.NEIClientConfig;
import codechicken.nei.PositionedStack;
import com.github.vfyjxf.nee.config.NEEConfig;
import com.github.vfyjxf.nee.nei.NEECraftingHandler;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import com.github.vfyjxf.nee.network.packet.PacketSlotStackChange;
import com.github.vfyjxf.nee.network.packet.PacketStackCountChange;
import com.github.vfyjxf.nee.utils.GuiUtils;
import com.github.vfyjxf.nee.utils.ItemUtils;
import cpw.mods.fml.common.Loader;
public class AppengHelper {
private static boolean hasLwjgl3 = Loader.isModLoaded("lwjgl3ify");
// LWJGL2 reports different scroll values for every platform, 120 for one tick on Windows.
// LWJGL3 reports the delta in exact scroll ticks.
private static int dwheelToScrollSteps(int dWheel) {
return hasLwjgl3 ? dWheel : dWheel / 120;
}
/**
* Prevent the scroll bar from being triggered when modifying the number of items This method is not intended to be
* called by NEE. Do not use this method for any reason.
*/
public static boolean handleMouseWheelInput(int dWheel) {
Minecraft mc = Minecraft.getMinecraft();
boolean isPatternTerm = isPatternTerm(mc.currentScreen);
boolean isInterface = mc.currentScreen instanceof GuiInterface;
if (isPatternTerm || isInterface) {
if (dWheel != 0) {
int x = Mouse.getEventX() * mc.currentScreen.width / mc.displayWidth;
int y = mc.currentScreen.height - Mouse.getEventY() * mc.currentScreen.height / mc.displayHeight - 1;
Slot currentSlot = ((GuiContainer) mc.currentScreen).getSlotAtPosition(x, y);
if (currentSlot instanceof SlotFake && currentSlot.getHasStack()) {
// try to change current itemstack to next ingredient;
if (Keyboard.isKeyDown(NEIClientConfig.getKeyBinding("nee.ingredient"))
&& GuiUtils.isCraftingSlot(currentSlot)) {
handleRecipeIngredientChange((GuiContainer) mc.currentScreen, currentSlot, dWheel);
return true;
} else if (Keyboard.isKeyDown(NEIClientConfig.getKeyBinding("nee.count"))) {
int changeCount = dwheelToScrollSteps(dWheel);
NEENetworkHandler.getInstance()
.sendToServer(new PacketStackCountChange(currentSlot.slotNumber, changeCount));
return true;
}
}
}
}
return false;
}
private static void handleRecipeIngredientChange(GuiContainer gui, Slot currentSlot, int dWheel) {
List<Integer> craftingSlots = new ArrayList<>();
int currentSlotIndex = currentSlot.getSlotIndex();
PositionedStack currentIngredients = NEECraftingHandler.ingredients.get(INPUT_KEY + currentSlotIndex);
if (currentIngredients != null && currentIngredients.items.length > 1) {
int currentStackIndex = ItemUtils.getIngredientIndex(currentSlot.getStack(), currentIngredients);
if (currentStackIndex >= 0) {
int nextStackIndex = dwheelToScrollSteps(dWheel);
for (int j = 0; j < Math.abs(nextStackIndex); j++) {
currentStackIndex = nextStackIndex > 0 ? currentStackIndex + 1 : currentStackIndex - 1;
if (currentStackIndex >= currentIngredients.items.length) {
currentStackIndex = 0;
} else if (currentStackIndex < 0) {
currentStackIndex = currentIngredients.items.length - 1;
}
ItemStack currentStack = currentIngredients.items[currentStackIndex].copy();
currentStack.stackSize = currentSlot.getStack().stackSize;
if (NEEConfig.allowSynchronousSwitchIngredient) {
for (Slot slot : getCraftingSlots(gui)) {
PositionedStack slotIngredients = NEECraftingHandler.ingredients
.get(INPUT_KEY + slot.getSlotIndex());
boolean areItemStackEqual = currentSlot.getHasStack() && slot.getHasStack()
&& currentSlot.getStack().isItemEqual(slot.getStack())
&& ItemStack.areItemStackTagsEqual(currentSlot.getStack(), slot.getStack());
boolean areIngredientEqual = slotIngredients != null
&& currentIngredients.contains(slotIngredients.items[0]);
if (areItemStackEqual && areIngredientEqual) {
craftingSlots.add(slot.slotNumber);
}
}
} else {
craftingSlots.add(currentSlot.slotNumber);
}
NEENetworkHandler.getInstance()
.sendToServer(new PacketSlotStackChange(currentStack, craftingSlots));
}
}
}
}
@SuppressWarnings("unchecked")
private static List<Slot> getCraftingSlots(GuiContainer gui) {
List<Slot> craftingSlots = new ArrayList<>();
for (Slot slot : (List<Slot>) gui.inventorySlots.inventorySlots) {
if (GuiUtils.isCraftingSlot(slot)) {
craftingSlots.add(slot);
}
}
return craftingSlots;
}
}
@@ -1,141 +0,0 @@
package com.github.vfyjxf.nee.asm;
import static org.objectweb.asm.Opcodes.*;
import java.util.Arrays;
import java.util.List;
import net.minecraft.launchwrapper.IClassTransformer;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.*;
import codechicken.lib.asm.ASMInit;
import codechicken.lib.asm.ObfMapping;
import com.github.vfyjxf.nee.NotEnoughEnergistics;
public class NEEClassTransformer implements IClassTransformer {
static {
ASMInit.init();
}
private static final List<String> transformedClassNames = Arrays.asList(
"appeng/integration/modules/NEIHelpers/NEIInscriberRecipeHandler",
"appeng/integration/modules/NEIHelpers/NEIGrinderRecipeHandler");
private static final String TARGET_CLASS_NAME = "appeng/client/gui/AEBaseGui";
private static final ObfMapping TARGET_METHOD_MAPPING = new ObfMapping(TARGET_CLASS_NAME, "func_146274_d", "()V")
.toClassloading();
private static final String METHOD_OWNER = "codechicken/nei/recipe/TemplateRecipeHandler";
private static final String METHOD_NAME_1 = "getOverlayHandler";
private static final String METHOD_NAME_2 = "hasOverlay";
private static final String METHOD_TARGET_1 = "(Lnet/minecraft/client/gui/inventory/GuiContainer;I)Lcodechicken/nei/api/IOverlayHandler;";
private static final String METHOD_TARGET_2 = "(Lnet/minecraft/client/gui/inventory/GuiContainer;Lnet/minecraft/inventory/Container;I)Z";
@Override
public byte[] transform(String name, String transformedName, byte[] basicClass) {
String internalName = transformedName.replace('.', '/');
// rewrite ae2's methods to support recipe transfer.
if (transformedClassNames.contains(internalName)) {
ClassNode classNode = createClassNode(basicClass);
for (MethodNode methodNode : classNode.methods) {
if (METHOD_NAME_1.equals(methodNode.name) && METHOD_TARGET_1.equals(methodNode.desc)) {
NotEnoughEnergistics.logger
.info("Transforming : " + internalName + methodNode.name + methodNode.desc);
for (AbstractInsnNode instruction : methodNode.instructions.toArray()) {
if (instruction.getOpcode() == ACONST_NULL) {
InsnList insnList = new InsnList();
insnList.add(new VarInsnNode(ALOAD, 0));
insnList.add(new VarInsnNode(ALOAD, 1));
insnList.add(new VarInsnNode(ILOAD, 2));
insnList.add(
new MethodInsnNode(
INVOKESPECIAL,
METHOD_OWNER,
METHOD_NAME_1,
METHOD_TARGET_1,
false));
methodNode.instructions.insert(instruction, insnList);
methodNode.instructions.remove(instruction);
}
}
}
if (METHOD_NAME_2.equals(methodNode.name) && METHOD_TARGET_2.equals(methodNode.desc)) {
NotEnoughEnergistics.logger
.info("Transforming : " + internalName + methodNode.name + methodNode.desc);
for (AbstractInsnNode instruction : methodNode.instructions.toArray()) {
if (instruction.getOpcode() == ICONST_0) {
InsnList insnList = new InsnList();
insnList.add(new VarInsnNode(ALOAD, 0));
insnList.add(new VarInsnNode(ALOAD, 1));
insnList.add(new VarInsnNode(ALOAD, 2));
insnList.add(new VarInsnNode(ILOAD, 3));
insnList.add(
new MethodInsnNode(
INVOKESPECIAL,
METHOD_OWNER,
METHOD_NAME_2,
METHOD_TARGET_2,
false));
methodNode.instructions.insert(instruction, insnList);
methodNode.instructions.remove(instruction);
}
}
}
}
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES);
classNode.accept(classWriter);
return classWriter.toByteArray();
}
if (TARGET_CLASS_NAME.equals(internalName)) {
ClassNode classNode = createClassNode(basicClass);
for (MethodNode methodNode : classNode.methods) {
if (TARGET_METHOD_MAPPING.matches(methodNode)) {
NotEnoughEnergistics.logger
.info("Transforming : " + internalName + methodNode.name + methodNode.desc);
AbstractInsnNode aLoad = methodNode.instructions.getFirst();
while (aLoad.getOpcode() != ILOAD) {
aLoad = aLoad.getNext();
}
InsnList insnList = new InsnList();
insnList.add(new VarInsnNode(ILOAD, 1));
insnList.add(
new MethodInsnNode(
INVOKESTATIC,
"com/github/vfyjxf/nee/asm/AppengHelper",
"handleMouseWheelInput",
"(I)Z",
false));
LabelNode label = new LabelNode();
insnList.add(new JumpInsnNode(IFEQ, label));
insnList.add(new InsnNode(RETURN));
insnList.add(label);
methodNode.instructions.insertBefore(aLoad, insnList);
}
}
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES);
classNode.accept(classWriter);
return classWriter.toByteArray();
}
return basicClass;
}
private ClassNode createClassNode(byte[] basicClass) {
ClassNode classNode = new ClassNode();
ClassReader classReader = new ClassReader(basicClass);
classReader.accept(classNode, 0);
return classNode;
}
}
@@ -1,33 +0,0 @@
package com.github.vfyjxf.nee.asm;
import java.util.Map;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
@IFMLLoadingPlugin.Name("NEELoadingPlugin")
@IFMLLoadingPlugin.MCVersion("1.7.10")
public class NEELoadingPlugin implements IFMLLoadingPlugin {
@Override
public String[] getASMTransformerClass() {
return new String[] { "com.github.vfyjxf.nee.asm.NEEClassTransformer" };
}
@Override
public String getModContainerClass() {
return null;
}
@Override
public String getSetupClass() {
return null;
}
@Override
public void injectData(Map<String, Object> data) {}
@Override
public String getAccessTransformerClass() {
return null;
}
}
@@ -8,14 +8,14 @@ import net.minecraft.item.Item;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseItemBlock;
import appeng.block.AEBaseTileBlock;
import appeng.core.features.AEFeature;
import com.github.vfyjxf.nee.NotEnoughEnergistics;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import com.github.vfyjxf.nee.network.NEEGuiHandler;
import appeng.block.AEBaseItemBlock;
import appeng.block.AEBaseTileBlock;
import appeng.core.features.AEFeature;
/**
* @author vfyjxf
*/
@@ -14,6 +14,8 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.google.common.collect.ImmutableSet;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
import appeng.api.implementations.ICraftingPatternItem;
@@ -51,8 +53,6 @@ import appeng.util.Platform;
import appeng.util.inv.AdaptorIInventory;
import appeng.util.inv.IInventoryDestination;
import appeng.util.inv.WrapperInvSlot;
import com.google.common.collect.ImmutableSet;
import cpw.mods.fml.relauncher.ReflectionHelper;
/**
@@ -2,8 +2,11 @@ package com.github.vfyjxf.nee.client;
import static com.github.vfyjxf.nee.config.NEEConfig.draggedStackDefaultSize;
import static com.github.vfyjxf.nee.config.NEEConfig.useStackSizeFromNEI;
import static com.github.vfyjxf.nee.nei.NEECraftingHandler.INPUT_KEY;
import static com.github.vfyjxf.nee.nei.NEECraftingHelper.tracker;
import static com.github.vfyjxf.nee.utils.GuiUtils.isPatternTerm;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -17,26 +20,33 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.client.event.GuiOpenEvent;
import net.minecraftforge.client.event.GuiScreenEvent;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import appeng.client.gui.AEBaseGui;
import appeng.client.gui.implementations.GuiCraftConfirm;
import appeng.client.gui.implementations.GuiPatternTerm;
import appeng.container.implementations.ContainerCraftConfirm;
import appeng.container.implementations.ContainerPatternTerm;
import appeng.container.slot.SlotFake;
import codechicken.nei.VisiblityData;
import codechicken.nei.api.INEIGuiHandler;
import codechicken.nei.api.TaggedInventoryArea;
import com.github.vfyjxf.nee.client.gui.widgets.GuiImgButtonEnableCombination;
import com.github.vfyjxf.nee.config.ItemCombination;
import com.github.vfyjxf.nee.config.NEEConfig;
import com.github.vfyjxf.nee.container.ContainerCraftingConfirm;
import com.github.vfyjxf.nee.nei.NEECraftingHandler;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import com.github.vfyjxf.nee.network.packet.PacketSlotStackChange;
import com.github.vfyjxf.nee.network.packet.PacketStackCountChange;
import com.github.vfyjxf.nee.utils.GuiUtils;
import com.github.vfyjxf.nee.utils.ItemUtils;
import appeng.api.events.GuiScrollEvent;
import appeng.client.gui.AEBaseGui;
import appeng.client.gui.implementations.GuiCraftConfirm;
import appeng.client.gui.implementations.GuiInterface;
import appeng.client.gui.implementations.GuiPatternTerm;
import appeng.container.implementations.ContainerCraftConfirm;
import appeng.container.implementations.ContainerPatternTerm;
import appeng.container.slot.SlotFake;
import codechicken.nei.NEIClientConfig;
import codechicken.nei.PositionedStack;
import codechicken.nei.VisiblityData;
import codechicken.nei.api.INEIGuiHandler;
import codechicken.nei.api.TaggedInventoryArea;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@@ -232,4 +242,87 @@ public class GuiEventHandler implements INEIGuiHandler {
public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
return false;
}
/**
* Prevent the scroll bar from being triggered when modifying the number of items This method is not intended to be
* called by NEE. Do not use this method for any reason.
*/
@SubscribeEvent
public boolean handleMouseWheelInput(GuiScrollEvent event) {
Minecraft mc = Minecraft.getMinecraft();
boolean isPatternTerm = isPatternTerm(mc.currentScreen);
boolean isInterface = event.guiScreen instanceof GuiInterface;
if (isPatternTerm || isInterface) {
Slot currentSlot = (event.guiScreen).getSlotAtPosition(event.mouseX, event.mouseY);
if (currentSlot instanceof SlotFake && currentSlot.getHasStack()) {
// try to change current itemstack to next ingredient;
if (Keyboard.isKeyDown(NEIClientConfig.getKeyBinding("nee.ingredient"))
&& GuiUtils.isCraftingSlot(currentSlot)) {
handleRecipeIngredientChange(event.guiScreen, currentSlot, event.scrollAmount);
return true;
} else if (Keyboard.isKeyDown(NEIClientConfig.getKeyBinding("nee.count"))) {
NEENetworkHandler.getInstance()
.sendToServer(new PacketStackCountChange(currentSlot.slotNumber, event.scrollAmount));
return true;
}
}
}
return false;
}
private static void handleRecipeIngredientChange(GuiContainer gui, Slot currentSlot, int dWheel) {
List<Integer> craftingSlots = new ArrayList<>();
int currentSlotIndex = currentSlot.getSlotIndex();
PositionedStack currentIngredients = NEECraftingHandler.ingredients.get(INPUT_KEY + currentSlotIndex);
if (currentIngredients != null && currentIngredients.items.length > 1) {
int currentStackIndex = ItemUtils.getIngredientIndex(currentSlot.getStack(), currentIngredients);
if (currentStackIndex >= 0) {
for (int j = 0; j < Math.abs(dWheel); j++) {
currentStackIndex += (dWheel < 0) ? -1 : 1;
if (currentStackIndex >= currentIngredients.items.length) {
currentStackIndex = 0;
} else if (currentStackIndex < 0) {
currentStackIndex = currentIngredients.items.length - 1;
}
ItemStack currentStack = currentIngredients.items[currentStackIndex].copy();
currentStack.stackSize = currentSlot.getStack().stackSize;
if (NEEConfig.allowSynchronousSwitchIngredient) {
for (Slot slot : getCraftingSlots(gui)) {
PositionedStack slotIngredients = NEECraftingHandler.ingredients
.get(INPUT_KEY + slot.getSlotIndex());
boolean areItemStackEqual = currentSlot.getHasStack() && slot.getHasStack()
&& currentSlot.getStack().isItemEqual(slot.getStack())
&& ItemStack.areItemStackTagsEqual(currentSlot.getStack(), slot.getStack());
boolean areIngredientEqual = slotIngredients != null
&& currentIngredients.contains(slotIngredients.items[0]);
if (areItemStackEqual && areIngredientEqual) {
craftingSlots.add(slot.slotNumber);
}
}
} else {
craftingSlots.add(currentSlot.slotNumber);
}
NEENetworkHandler.getInstance()
.sendToServer(new PacketSlotStackChange(currentStack, craftingSlots));
}
}
}
}
@SuppressWarnings("unchecked")
private static List<Slot> getCraftingSlots(GuiContainer gui) {
List<Slot> craftingSlots = new ArrayList<>();
for (Slot slot : (List<Slot>) gui.inventorySlots.inventorySlots) {
if (GuiUtils.isCraftingSlot(slot)) {
craftingSlots.add(slot);
}
}
return craftingSlots;
}
}
@@ -15,11 +15,6 @@ import net.minecraftforge.client.event.GuiScreenEvent;
import org.lwjgl.input.Keyboard;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.NEIClientConfig;
import codechicken.nei.recipe.GuiRecipe;
import codechicken.nei.recipe.IRecipeHandler;
import com.github.vfyjxf.nee.config.NEEConfig;
import com.github.vfyjxf.nee.nei.NEECraftingHandler;
import com.github.vfyjxf.nee.nei.NEECraftingHelper;
@@ -27,6 +22,10 @@ import com.github.vfyjxf.nee.utils.GuiUtils;
import com.github.vfyjxf.nee.utils.Ingredient;
import com.github.vfyjxf.nee.utils.IngredientTracker;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.NEIClientConfig;
import codechicken.nei.recipe.GuiRecipe;
import codechicken.nei.recipe.IRecipeHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.ReflectionHelper;
@@ -6,6 +6,12 @@ import net.minecraft.item.ItemStack;
import net.p455w0rd.wirelesscraftingterminal.items.ItemEnum;
import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import com.github.vfyjxf.nee.container.ContainerCraftingAmount;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import com.github.vfyjxf.nee.network.packet.PacketCraftingRequest;
import com.github.vfyjxf.nee.utils.GuiUtils;
import com.github.vfyjxf.nee.utils.ModIDs;
import appeng.api.AEApi;
import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.IParts;
@@ -21,13 +27,6 @@ import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketSwitchGuis;
import appeng.helpers.Reflected;
import appeng.parts.reporting.PartCraftingTerminal;
import com.github.vfyjxf.nee.container.ContainerCraftingAmount;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import com.github.vfyjxf.nee.network.packet.PacketCraftingRequest;
import com.github.vfyjxf.nee.utils.GuiUtils;
import com.github.vfyjxf.nee.utils.ModIDs;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Optional;
@@ -4,9 +4,6 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import appeng.client.gui.AEBaseGui;
import appeng.container.slot.SlotRestrictedInput;
import com.github.vfyjxf.nee.NotEnoughEnergistics;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import com.github.vfyjxf.nee.client.gui.widgets.GuiImgButtonRemove;
@@ -14,6 +11,9 @@ import com.github.vfyjxf.nee.container.ContainerPatternInterface;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import com.github.vfyjxf.nee.network.packet.PacketValueConfigServer;
import appeng.client.gui.AEBaseGui;
import appeng.container.slot.SlotRestrictedInput;
public class GuiPatternInterface extends AEBaseGui {
private final ContainerPatternInterface container;
@@ -7,10 +7,10 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import appeng.client.gui.widgets.ITooltip;
import com.github.vfyjxf.nee.config.ItemCombination;
import appeng.client.gui.widgets.ITooltip;
public class GuiImgButtonEnableCombination extends GuiButton implements ITooltip {
private ItemCombination currentValue;
@@ -3,12 +3,12 @@ package com.github.vfyjxf.nee.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import appeng.api.storage.ITerminalHost;
import appeng.container.implementations.ContainerCraftConfirm;
import appeng.util.Platform;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
public class ContainerCraftingConfirm extends ContainerCraftConfirm {
private TilePatternInterface tile;
@@ -9,6 +9,8 @@ import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import appeng.api.implementations.ICraftingPatternItem;
import appeng.api.networking.crafting.ICraftingPatternDetails;
import appeng.api.storage.data.IAEItemStack;
@@ -23,8 +25,6 @@ import appeng.tile.inventory.IAEAppEngInventory;
import appeng.tile.inventory.InvOperation;
import appeng.util.Platform;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
public class ContainerPatternInterface extends AEBaseContainer implements IAEAppEngInventory {
private final InventoryPlayer playerInventory;
@@ -3,12 +3,12 @@ package com.github.vfyjxf.nee.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import appeng.api.storage.ITerminalHost;
import appeng.container.implementations.ContainerCraftConfirm;
import appeng.util.Platform;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
public class WCTContainerCraftingConfirm extends ContainerCraftConfirm {
private TilePatternInterface tile;
@@ -10,12 +10,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.oredict.OreDictionary;
import appeng.util.Platform;
import codechicken.nei.PositionedStack;
import codechicken.nei.api.IOverlayHandler;
import codechicken.nei.recipe.IRecipeHandler;
import codechicken.nei.recipe.TemplateRecipeHandler;
import com.github.vfyjxf.nee.config.ItemCombination;
import com.github.vfyjxf.nee.config.NEEConfig;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
@@ -28,6 +22,11 @@ import com.github.vfyjxf.nee.utils.ItemUtils;
import com.github.vfyjxf.nee.utils.ModIDs;
import com.glodblock.github.nei.FluidPatternTerminalRecipeTransferHandler;
import appeng.util.Platform;
import codechicken.nei.PositionedStack;
import codechicken.nei.api.IOverlayHandler;
import codechicken.nei.recipe.IRecipeHandler;
import codechicken.nei.recipe.TemplateRecipeHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Optional;
@@ -28,6 +28,16 @@ import net.minecraftforge.oredict.OreDictionary;
import org.lwjgl.input.Keyboard;
import com.github.vfyjxf.nee.NotEnoughEnergistics;
import com.github.vfyjxf.nee.config.NEEConfig;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import com.github.vfyjxf.nee.network.packet.PacketOpenCraftAmount;
import com.github.vfyjxf.nee.network.packet.PacketValueConfigServer;
import com.github.vfyjxf.nee.utils.GuiUtils;
import com.github.vfyjxf.nee.utils.IngredientTracker;
import com.github.vfyjxf.nee.utils.ItemUtils;
import com.github.vfyjxf.nee.utils.ModIDs;
import appeng.client.gui.implementations.GuiCraftingTerm;
import appeng.container.slot.SlotCraftingMatrix;
import appeng.container.slot.SlotFakeCraftingMatrix;
@@ -42,17 +52,6 @@ import codechicken.nei.PositionedStack;
import codechicken.nei.api.IOverlayHandler;
import codechicken.nei.recipe.GuiRecipe;
import codechicken.nei.recipe.IRecipeHandler;
import com.github.vfyjxf.nee.NotEnoughEnergistics;
import com.github.vfyjxf.nee.config.NEEConfig;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import com.github.vfyjxf.nee.network.packet.PacketOpenCraftAmount;
import com.github.vfyjxf.nee.network.packet.PacketValueConfigServer;
import com.github.vfyjxf.nee.utils.GuiUtils;
import com.github.vfyjxf.nee.utils.IngredientTracker;
import com.github.vfyjxf.nee.utils.ItemUtils;
import com.github.vfyjxf.nee.utils.ModIDs;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.ReflectionHelper;
@@ -12,16 +12,6 @@ import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTermHandler;
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
import net.p455w0rd.wirelesscraftingterminal.helpers.WirelessTerminalGuiObject;
import appeng.api.AEApi;
import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.api.parts.IPart;
import appeng.api.parts.IPartHost;
import appeng.api.storage.ITerminalHost;
import appeng.client.gui.implementations.GuiCraftConfirm;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerOpenContext;
import appeng.parts.reporting.PartCraftingTerminal;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import com.github.vfyjxf.nee.client.gui.GuiCraftingAmount;
import com.github.vfyjxf.nee.client.gui.GuiPatternInterface;
@@ -31,6 +21,15 @@ import com.github.vfyjxf.nee.container.ContainerPatternInterface;
import com.github.vfyjxf.nee.container.WCTContainerCraftingConfirm;
import com.github.vfyjxf.nee.utils.ModIDs;
import appeng.api.AEApi;
import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.api.parts.IPart;
import appeng.api.parts.IPartHost;
import appeng.api.storage.ITerminalHost;
import appeng.client.gui.implementations.GuiCraftConfirm;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerOpenContext;
import appeng.parts.reporting.PartCraftingTerminal;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.network.IGuiHandler;
@@ -7,7 +7,6 @@ import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import thaumicenergistics.common.container.ContainerKnowledgeInscriber;
import appeng.container.slot.SlotFakeCraftingMatrix;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
@@ -15,6 +14,7 @@ import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import cpw.mods.fml.relauncher.ReflectionHelper;
import io.netty.buffer.ByteBuf;
import thaumicenergistics.common.container.ContainerKnowledgeInscriber;
/**
* @author vfyjxf
@@ -24,6 +24,15 @@ import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import org.apache.commons.lang3.tuple.Pair;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import com.github.vfyjxf.nee.container.ContainerCraftingAmount;
import com.github.vfyjxf.nee.container.ContainerCraftingConfirm;
import com.github.vfyjxf.nee.container.WCTContainerCraftingConfirm;
import com.github.vfyjxf.nee.network.NEEGuiHandler;
import com.github.vfyjxf.nee.utils.GuiUtils;
import com.github.vfyjxf.nee.utils.ModIDs;
import com.google.common.base.Optional;
import appeng.api.AEApi;
import appeng.api.config.SecurityPermissions;
import appeng.api.networking.IGrid;
@@ -45,16 +54,6 @@ import appeng.core.AELog;
import appeng.core.sync.GuiBridge;
import appeng.util.Platform;
import appeng.util.item.AEItemStack;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import com.github.vfyjxf.nee.container.ContainerCraftingAmount;
import com.github.vfyjxf.nee.container.ContainerCraftingConfirm;
import com.github.vfyjxf.nee.container.WCTContainerCraftingConfirm;
import com.github.vfyjxf.nee.network.NEEGuiHandler;
import com.github.vfyjxf.nee.utils.GuiUtils;
import com.github.vfyjxf.nee.utils.ModIDs;
import com.google.common.base.Optional;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
@@ -11,14 +11,14 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import wanion.avaritiaddons.block.extremeautocrafter.ContainerExtremeAutoCrafter;
import wanion.avaritiaddons.block.extremeautocrafter.TileEntityExtremeAutoCrafter;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import cpw.mods.fml.relauncher.ReflectionHelper;
import io.netty.buffer.ByteBuf;
import wanion.avaritiaddons.block.extremeautocrafter.ContainerExtremeAutoCrafter;
import wanion.avaritiaddons.block.extremeautocrafter.TileEntityExtremeAutoCrafter;
/**
* @author vfyjxf
@@ -10,6 +10,10 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import com.github.vfyjxf.nee.utils.ModIDs;
import com.glodblock.github.client.gui.container.ContainerFluidPatternTerminal;
import com.glodblock.github.client.gui.container.ContainerFluidPatternTerminalEx;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridNode;
import appeng.api.networking.security.ISecurityGrid;
@@ -18,11 +22,6 @@ import appeng.container.AEBaseContainer;
import appeng.container.implementations.ContainerPatternTerm;
import appeng.container.implementations.ContainerPatternTermEx;
import appeng.helpers.IContainerCraftingPacket;
import com.github.vfyjxf.nee.utils.ModIDs;
import com.glodblock.github.client.gui.container.ContainerFluidPatternTerminal;
import com.glodblock.github.client.gui.container.ContainerFluidPatternTerminalEx;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.network.ByteBufUtils;
@@ -10,13 +10,12 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import appeng.container.ContainerOpenContext;
import appeng.container.implementations.ContainerCraftingTerm;
import com.github.vfyjxf.nee.container.ContainerCraftingAmount;
import com.github.vfyjxf.nee.network.NEEGuiHandler;
import com.github.vfyjxf.nee.utils.GuiUtils;
import appeng.container.ContainerOpenContext;
import appeng.container.implementations.ContainerCraftingTerm;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
@@ -4,11 +4,10 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.Container;
import net.minecraft.tileentity.TileEntity;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerOpenContext;
import com.github.vfyjxf.nee.network.NEEGuiHandler;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerOpenContext;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
@@ -13,16 +13,15 @@ import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import com.google.common.base.Optional;
import appeng.api.AEApi;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridNode;
import appeng.api.networking.security.IActionHost;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerNull;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import com.google.common.base.Optional;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
@@ -69,7 +69,7 @@ public class PacketStackCountChange implements IMessage {
for (int i = 0; i < Math.abs(message.getChangeCount()); i++) {
int currentStackSize = message.getChangeCount() > 0 ? currentSlot.getStack().stackSize + 1
: currentSlot.getStack().stackSize - 1;
if (currentStackSize <= currentSlot.getStack().getMaxStackSize() && currentStackSize > 0) {
if (currentStackSize > 0) {
ItemStack nextStack = currentSlot.getStack().copy();
nextStack.stackSize = currentStackSize;
currentSlot.putStack(nextStack);
@@ -3,11 +3,10 @@ package com.github.vfyjxf.nee.network.packet;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import codechicken.nei.recipe.GuiRecipe;
import com.github.vfyjxf.nee.nei.NEECraftingHelper;
import com.github.vfyjxf.nee.utils.GuiUtils;
import codechicken.nei.recipe.GuiRecipe;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
@@ -6,16 +6,15 @@ import net.minecraft.inventory.Slot;
import net.p455w0rd.wirelesscraftingterminal.common.container.ContainerWirelessCraftingTerminal;
import net.p455w0rd.wirelesscraftingterminal.helpers.WirelessTerminalGuiObject;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import com.github.vfyjxf.nee.container.ContainerPatternInterface;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridNode;
import appeng.api.networking.security.IActionHost;
import appeng.container.AEBaseContainer;
import appeng.container.slot.SlotRestrictedInput;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import com.github.vfyjxf.nee.container.ContainerPatternInterface;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
@@ -7,9 +7,9 @@ import java.util.Set;
import javax.annotation.Nonnull;
import vazkii.botania.client.integration.nei.recipe.RecipeHandlerLexicaBotania;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.IRecipeHandler;
import vazkii.botania.client.integration.nei.recipe.RecipeHandlerLexicaBotania;
public class BotaniaRecipeProcessor implements IRecipeProcessor {
@@ -15,11 +15,11 @@ public class GTPPRecipeProcessor implements IRecipeProcessor {
@Nonnull
@Override
@SuppressWarnings("deprecation")
public Set<String> getAllOverlayIdentifier() {
HashSet<String> identifiers = new HashSet<>(Collections.singletonList("GTPP_Decayables"));
// GTNH version of GT++ deprecated this, but other versions still use it
// noinspection deprecation
for (GTPP_Recipe.GTPP_Recipe_Map_Internal gtppMap : GTPP_Recipe.GTPP_Recipe_Map_Internal.sMappingsEx) {
if (gtppMap.mNEIAllowed) {
identifiers.add(gtppMap.mNEIName);
@@ -13,12 +13,11 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.IRecipeHandler;
import com.github.vfyjxf.nee.utils.GuiUtils;
import com.glodblock.github.client.gui.GuiFluidPatternTerminalEx;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.IRecipeHandler;
import gregtech.api.enums.ItemList;
import gregtech.api.util.GT_Recipe;
import gregtech.nei.GT_NEI_DefaultHandler.FixedPositionedStack;
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.github.vfyjxf.nee.NotEnoughEnergistics;
import cpw.mods.fml.common.Loader;
public class RecipeProcessor {
@@ -4,11 +4,11 @@ import java.util.*;
import javax.annotation.Nonnull;
import com.djgiannuzz.thaumcraftneiplugin.items.ItemAspect;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.IRecipeHandler;
import com.djgiannuzz.thaumcraftneiplugin.items.ItemAspect;
/**
* @author vfyjxf
*/
@@ -5,6 +5,10 @@ import static com.github.vfyjxf.nee.block.BlockPatternInterface.BLOCK_INSTANCE;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.ShapedOreRecipe;
import com.github.vfyjxf.nee.NotEnoughEnergistics;
import com.github.vfyjxf.nee.block.BlockPatternInterface;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import appeng.api.AEApi;
import appeng.api.definitions.IBlocks;
import appeng.api.definitions.IDefinitions;
@@ -14,11 +18,6 @@ import appeng.api.util.AEColor;
import appeng.core.features.ActivityState;
import appeng.core.features.BlockStackSrc;
import appeng.tile.AEBaseTile;
import com.github.vfyjxf.nee.NotEnoughEnergistics;
import com.github.vfyjxf.nee.block.BlockPatternInterface;
import com.github.vfyjxf.nee.block.tile.TilePatternInterface;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -6,6 +6,12 @@ import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import com.github.vfyjxf.nee.container.WCTContainerCraftingConfirm;
import com.glodblock.github.client.gui.GuiFluidPatternTerminal;
import com.glodblock.github.client.gui.GuiFluidPatternTerminalEx;
import com.glodblock.github.client.gui.container.ContainerFluidPatternTerminal;
import com.glodblock.github.client.gui.container.ContainerFluidPatternTerminalEx;
import appeng.client.gui.implementations.GuiCraftConfirm;
import appeng.client.gui.implementations.GuiCraftingTerm;
import appeng.client.gui.implementations.GuiPatternTerm;
@@ -13,12 +19,6 @@ import appeng.client.gui.implementations.GuiPatternTermEx;
import appeng.container.implementations.ContainerPatternTerm;
import appeng.container.implementations.ContainerPatternTermEx;
import appeng.helpers.IContainerCraftingPacket;
import com.github.vfyjxf.nee.container.WCTContainerCraftingConfirm;
import com.glodblock.github.client.gui.GuiFluidPatternTerminal;
import com.glodblock.github.client.gui.GuiFluidPatternTerminalEx;
import com.glodblock.github.client.gui.container.ContainerFluidPatternTerminal;
import com.glodblock.github.client.gui.container.ContainerFluidPatternTerminalEx;
import cpw.mods.fml.common.Loader;
/**
@@ -12,6 +12,11 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal;
import com.github.vfyjxf.nee.config.NEEConfig;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import com.github.vfyjxf.nee.network.packet.PacketCraftingRequest;
import com.glodblock.github.client.gui.base.FCGuiMonitor;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.client.gui.implementations.GuiMEMonitorable;
@@ -20,11 +25,6 @@ import appeng.util.item.AEItemStack;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.GuiRecipe;
import codechicken.nei.recipe.IRecipeHandler;
import com.github.vfyjxf.nee.config.NEEConfig;
import com.github.vfyjxf.nee.network.NEENetworkHandler;
import com.github.vfyjxf.nee.network.packet.PacketCraftingRequest;
import com.glodblock.github.client.gui.base.FCGuiMonitor;
import cpw.mods.fml.relauncher.ReflectionHelper;
public class IngredientTracker {
@@ -11,14 +11,13 @@ import net.minecraft.nbt.JsonToNBT;
import net.minecraft.nbt.NBTException;
import net.minecraft.nbt.NBTTagCompound;
import codechicken.nei.PositionedStack;
import com.github.vfyjxf.nee.NotEnoughEnergistics;
import com.github.vfyjxf.nee.processor.IRecipeProcessor;
import com.github.vfyjxf.nee.processor.RecipeProcessor;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import codechicken.nei.PositionedStack;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;