mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-24 04:50:30 -04:00
Merge pull request #111 from GTNewHorizons/fix/unhandled-side
Fix unhandled side for redstone connection
This commit is contained in:
commit
646db1fcb6
36
build.gradle
36
build.gradle
@ -1,4 +1,4 @@
|
||||
//version: 1697697256
|
||||
//version: 1702141377
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
Also, you may replace this file at any time if there is an update available.
|
||||
@ -28,27 +28,12 @@ import java.util.concurrent.TimeUnit
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
maven {
|
||||
name 'forge'
|
||||
url 'https://maven.minecraftforge.net'
|
||||
}
|
||||
maven {
|
||||
// GTNH RetroFuturaGradle and ASM Fork
|
||||
name "GTNH Maven"
|
||||
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
||||
allowInsecureProtocol = true
|
||||
}
|
||||
maven {
|
||||
name 'sonatype'
|
||||
url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
||||
}
|
||||
maven {
|
||||
name 'Scala CI dependencies'
|
||||
url 'https://repo1.maven.org/maven2/'
|
||||
}
|
||||
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
@ -69,7 +54,7 @@ plugins {
|
||||
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.3.24'
|
||||
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.26'
|
||||
}
|
||||
|
||||
print("You might want to check out './gradlew :faq' if your build fails.\n")
|
||||
@ -302,7 +287,7 @@ if (apiPackage) {
|
||||
}
|
||||
|
||||
if (accessTransformersFile) {
|
||||
for (atFile in accessTransformersFile.split(",")) {
|
||||
for (atFile in accessTransformersFile.split(" ")) {
|
||||
String targetFile = "src/main/resources/META-INF/" + atFile.trim()
|
||||
if (!getFile(targetFile).exists()) {
|
||||
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
|
||||
@ -628,7 +613,7 @@ repositories {
|
||||
}
|
||||
maven {
|
||||
name = "ic2"
|
||||
url = getURL("https://maven.ic2.player.to/", "https://maven2.ic2.player.to/")
|
||||
url = getURL("https://maven2.ic2.player.to/", "https://maven.ic2.player.to/")
|
||||
content {
|
||||
includeGroup "net.industrial-craft"
|
||||
}
|
||||
@ -646,7 +631,7 @@ repositories {
|
||||
|
||||
def mixinProviderGroup = "io.github.legacymoddingmc"
|
||||
def mixinProviderModule = "unimixins"
|
||||
def mixinProviderVersion = "0.1.7.1"
|
||||
def mixinProviderVersion = "0.1.13"
|
||||
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
|
||||
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
|
||||
ext.mixinProviderSpec = mixinProviderSpec
|
||||
@ -687,6 +672,8 @@ configurations.all {
|
||||
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")
|
||||
|
||||
substitute module('org.scala-lang:scala-library:2.11.1') using module('org.scala-lang:scala-library:2.11.5') because('To allow mixing with Java 8 targets')
|
||||
}
|
||||
}
|
||||
|
||||
@ -793,12 +780,12 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def lwjgl3ifyVersion = '1.5.1'
|
||||
def lwjgl3ifyVersion = '1.5.7'
|
||||
if (modId != 'lwjgl3ify') {
|
||||
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
|
||||
}
|
||||
if (modId != 'hodgepodge') {
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.17')
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35')
|
||||
}
|
||||
|
||||
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
|
||||
@ -1187,9 +1174,8 @@ publishing {
|
||||
version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
if (usesMavenPublishing.toBoolean()) {
|
||||
if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) {
|
||||
maven {
|
||||
url = mavenPublishUrl
|
||||
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
|
||||
@ -1311,7 +1297,7 @@ def addCurseForgeRelation(String type, String name) {
|
||||
|
||||
// Updating
|
||||
|
||||
def buildscriptGradleVersion = "8.2.1"
|
||||
def buildscriptGradleVersion = "8.5"
|
||||
|
||||
tasks.named('wrapper', Wrapper).configure {
|
||||
gradleVersion = buildscriptGradleVersion
|
||||
|
@ -7,34 +7,34 @@ dependencies {
|
||||
|
||||
compile("com.google.code.findbugs:jsr305:3.0.2")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-277-GTNH:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-300-GTNH:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:EnderStorage:1.4.12:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.44.71:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.45.00:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compile("com.github.GTNewHorizons:ForestryMC:4.6.14:dev") {
|
||||
compile("com.github.GTNewHorizons:ForestryMC:4.7.0:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:Railcraft:9.15.0:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:Railcraft:9.15.3:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compile("com.github.GTNewHorizons:NotEnoughItems:2.4.5-GTNH:dev") {
|
||||
compile("com.github.GTNewHorizons:NotEnoughItems:2.4.13-GTNH:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.3.4:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.4.1:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.8:dev") {
|
||||
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.10:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compile("com.github.GTNewHorizons:CodeChickenCore:1.1.11:dev") {
|
||||
compile("com.github.GTNewHorizons:CodeChickenCore:1.1.13:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:waila:1.6.2:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:waila:1.6.5:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:Galacticraft:3.0.74-GTNH:dev") {
|
||||
@ -43,23 +43,23 @@ dependencies {
|
||||
compileOnly("com.github.GTNewHorizons:TinkersMechworks:0.3.0:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:ProjectRed:4.7.12-GTNH:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:ProjectRed:4.8.0-GTNH:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:BloodMagic:1.4.3:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.4.13-GTNH:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.5.4-GTNH:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:ExtraCells2:2.5.34:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly('com.github.GTNewHorizons:AE2FluidCraft-Rework:1.1.62-gtnh:dev') {
|
||||
compileOnly('com.github.GTNewHorizons:AE2FluidCraft-Rework:1.1.73-gtnh:dev') {
|
||||
transitive = false
|
||||
}
|
||||
compile("com.github.GTNewHorizons:EnderCore:0.2.18:dev")
|
||||
compile("com.github.GTNewHorizons:EnderIO:2.5.3:dev") {
|
||||
compile("com.github.GTNewHorizons:EnderIO:2.5.8:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.6.0-GTNH:dev") {
|
||||
@ -71,7 +71,7 @@ dependencies {
|
||||
compileOnly("com.github.GTNewHorizons:WirelessRedstone-CBE:1.4.8:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:BuildCraft:7.1.36:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:BuildCraft:7.1.38:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("appeng:RotaryCraft:V5c:api") {
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
5
gradlew
vendored
5
gradlew
vendored
@ -130,10 +130,13 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
|
@ -8,7 +8,6 @@
|
||||
# - gt_bender : Plate Bending Machine Recipe
|
||||
# - gt_canner : Canning Machine Recipe
|
||||
# - gt_chemical : Chemical Recipe
|
||||
# - gt_cnc : CNC-Machine Recipe
|
||||
# - gt_cutter : Cutter Recipe
|
||||
# - gt_fluidCanner : Fluid Canner Recipe
|
||||
# - gt_formingPress : Forming Press Recipe
|
||||
|
@ -230,11 +230,13 @@ class SimpleBlock(material: Material = Material.iron) extends Block(material) {
|
||||
|
||||
final override def canConnectRedstone(world: IBlockAccess, x: Int, y: Int, z: Int, side: Int) =
|
||||
canConnectRedstone(world, x, y, z, side match {
|
||||
case -2 => ForgeDirection.DOWN
|
||||
case -1 => ForgeDirection.UP
|
||||
case 0 => ForgeDirection.NORTH
|
||||
case 1 => ForgeDirection.EAST
|
||||
case 2 => ForgeDirection.SOUTH
|
||||
case 3 => ForgeDirection.WEST
|
||||
case _ => ForgeDirection.UNKNOWN
|
||||
})
|
||||
|
||||
def canConnectRedstone(world: IBlockAccess, x: Int, y: Int, z: Int, side: ForgeDirection) = false
|
||||
|
@ -1,9 +1,10 @@
|
||||
package li.cil.oc.integration.gregtech
|
||||
|
||||
import java.util
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import com.typesafe.config.ConfigValue
|
||||
import gregtech.api.enums.GT_Values
|
||||
import gregtech.api.recipe.RecipeMaps
|
||||
import li.cil.oc.common.recipe.Recipes
|
||||
import li.cil.oc.common.recipe.Recipes.RecipeException
|
||||
import net.minecraft.item.ItemStack
|
||||
@ -18,7 +19,6 @@ object RecipeHandler {
|
||||
Recipes.registerRecipeHandler("gt_bender", addGTBenderRecipe)
|
||||
Recipes.registerRecipeHandler("gt_canner", addGTCannerRecipe)
|
||||
Recipes.registerRecipeHandler("gt_chemical", addGTChemicalRecipe)
|
||||
Recipes.registerRecipeHandler("gt_cnc", addGTCNCRecipe)
|
||||
Recipes.registerRecipeHandler("gt_cutter", addGTCutterRecipe)
|
||||
Recipes.registerRecipeHandler("gt_fluidCanner", addGTFluidCannerRecipe)
|
||||
Recipes.registerRecipeHandler("gt_formingPress", addGTFormingPressRecipe)
|
||||
@ -32,11 +32,13 @@ object RecipeHandler {
|
||||
secondaryInputs match {
|
||||
case Some(value) =>
|
||||
for (primaryInput <- primaryInputs; secondaryInput <- value) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addAlloySmelterRecipe(primaryInput, secondaryInput, output, duration, eu)
|
||||
GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput).itemOutputs(output).duration(duration)
|
||||
.eut(eu).addTo(RecipeMaps.alloySmelterRecipes)
|
||||
}
|
||||
case _ =>
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addAlloySmelterRecipe(primaryInput, null, output, duration, eu)
|
||||
GT_Values.RA.stdBuilder().itemInputs(primaryInput).itemOutputs(output).duration(duration)
|
||||
.eut(eu).addTo(RecipeMaps.alloySmelterRecipes)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -46,11 +48,23 @@ object RecipeHandler {
|
||||
secondaryInputs match {
|
||||
case Some(value) =>
|
||||
for (primaryInput <- primaryInputs; secondaryInput <- value) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addAssemblerRecipe(primaryInput, secondaryInput, fluidInput.orNull, output, duration, eu)
|
||||
var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput)
|
||||
fluidInput match {
|
||||
case Some(fluidStack) =>
|
||||
recipe = recipe.fluidInputs(fluidStack)
|
||||
case _ =>
|
||||
}
|
||||
recipe.itemOutputs(output).duration(duration).eut(eu).addTo(RecipeMaps.assemblerRecipes)
|
||||
}
|
||||
case _ =>
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addAssemblerRecipe(primaryInput, null, fluidInput.orNull, output, duration, eu)
|
||||
var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput)
|
||||
fluidInput match {
|
||||
case Some(fluidStack) =>
|
||||
recipe = recipe.fluidInputs(fluidStack)
|
||||
case _ =>
|
||||
}
|
||||
recipe.itemOutputs(output).duration(duration).eut(eu).addTo(RecipeMaps.assemblerRecipes)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -58,70 +72,111 @@ object RecipeHandler {
|
||||
def addGTBenderRecipe(output: ItemStack, recipe: Config) {
|
||||
val (primaryInputs, _, _, _, _, eu, duration) = parseRecipe(output, recipe)
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addBenderRecipe(primaryInput, output, duration, eu)
|
||||
GT_Values.RA.stdBuilder().itemInputs(primaryInput).itemOutputs(output).duration(duration).eut(eu)
|
||||
.addTo(RecipeMaps.benderRecipes)
|
||||
}
|
||||
}
|
||||
|
||||
def addGTCannerRecipe(output: ItemStack, recipe: Config) {
|
||||
val (primaryInputs, secondaryInputs, _, _, secondaryOutputs, eu, duration) = parseRecipe(output, recipe)
|
||||
val secondaryOutput = secondaryOutputs.headOption.orNull
|
||||
val secondaryOutput = secondaryOutputs.headOption
|
||||
secondaryInputs match {
|
||||
case Some(value) =>
|
||||
for (primaryInput <- primaryInputs; secondaryInput <- value) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addCannerRecipe(primaryInput, secondaryInput, output, secondaryOutput, duration, eu)
|
||||
var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput)
|
||||
secondaryOutput match {
|
||||
case Some(itemStack) =>
|
||||
recipe = recipe.itemOutputs(output, itemStack)
|
||||
case _ =>
|
||||
recipe = recipe.itemOutputs(output)
|
||||
}
|
||||
recipe.duration(duration).eut(eu).addTo(RecipeMaps.cannerRecipes)
|
||||
}
|
||||
case None =>
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addCannerRecipe(primaryInput, null, output, secondaryOutput, duration, eu)
|
||||
var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput)
|
||||
secondaryOutput match {
|
||||
case Some(itemStack) =>
|
||||
recipe = recipe.itemOutputs(output, itemStack)
|
||||
case _ =>
|
||||
recipe = recipe.itemOutputs(output)
|
||||
}
|
||||
recipe.duration(duration).eut(eu).addTo(RecipeMaps.cannerRecipes)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def addGTChemicalRecipe(output: ItemStack, recipe: Config) {
|
||||
val (primaryInputs, secondaryInputs, fluidInput, fluidOutput, _, _, duration) = parseRecipe(output, recipe)
|
||||
val (primaryInputs, secondaryInputs, fluidInput, fluidOutput, _, eu, duration) = parseRecipe(output, recipe)
|
||||
secondaryInputs match {
|
||||
case Some(value) =>
|
||||
for (primaryInput <- primaryInputs; secondaryOutput <- value) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addChemicalRecipe(primaryInput, secondaryOutput, fluidInput.orNull, fluidOutput.orNull, output, duration)
|
||||
for (primaryInput <- primaryInputs; secondaryInput <- value) {
|
||||
var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput)
|
||||
fluidInput match {
|
||||
case Some(fluidStack) =>
|
||||
recipe = recipe.fluidInputs(fluidStack)
|
||||
case _ =>
|
||||
}
|
||||
fluidOutput match {
|
||||
case Some(fluidStack) =>
|
||||
recipe = recipe.fluidOutputs(fluidStack)
|
||||
case _ =>
|
||||
}
|
||||
recipe.itemOutputs(output).duration(duration).eut(eu).addTo(RecipeMaps.chemicalReactorRecipes)
|
||||
}
|
||||
case _ =>
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addChemicalRecipe(primaryInput, null, fluidInput.orNull, fluidOutput.orNull, output, duration)
|
||||
var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput)
|
||||
fluidInput match {
|
||||
case Some(fluidStack) =>
|
||||
recipe = recipe.fluidInputs(fluidStack)
|
||||
case _ =>
|
||||
}
|
||||
fluidOutput match {
|
||||
case Some(fluidStack) =>
|
||||
recipe = recipe.fluidOutputs(fluidStack)
|
||||
case _ =>
|
||||
}
|
||||
recipe.itemOutputs(output).duration(duration).eut(eu).addTo(RecipeMaps.chemicalReactorRecipes)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def addGTCNCRecipe(output: ItemStack, recipe: Config) {
|
||||
val (primaryInputs, _, _, _, _, eu, duration) = parseRecipe(output, recipe)
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addCNCRecipe(primaryInput, output, duration, eu)
|
||||
}
|
||||
}
|
||||
|
||||
def addGTCutterRecipe(output: ItemStack, recipe: Config) {
|
||||
val (primaryInputs, _, fluidInput, _, secondaryOutputs, eu, duration) = parseRecipe(output, recipe)
|
||||
val secondaryOutput = secondaryOutputs.headOption.orNull
|
||||
fluidInput match {
|
||||
case Some(fluid) =>
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addCutterRecipe(primaryInput, fluid, output, secondaryOutput, duration, eu)
|
||||
}
|
||||
case _ =>
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addCutterRecipe(primaryInput, output, secondaryOutput, duration, eu)
|
||||
}
|
||||
val secondaryOutput = secondaryOutputs.headOption
|
||||
for (primaryInput <- primaryInputs) {
|
||||
var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput)
|
||||
fluidInput match {
|
||||
case Some(fluidStack) =>
|
||||
recipe = recipe.fluidInputs(fluidStack)
|
||||
case _ =>
|
||||
}
|
||||
secondaryOutput match {
|
||||
case Some(itemStack) =>
|
||||
recipe = recipe.itemOutputs(output, itemStack)
|
||||
case _ =>
|
||||
recipe = recipe.itemOutputs(output)
|
||||
}
|
||||
recipe.duration(duration).eut(eu).addTo(RecipeMaps.cutterRecipes)
|
||||
}
|
||||
}
|
||||
|
||||
def addGTFluidCannerRecipe(output: ItemStack, recipe: Config) {
|
||||
val (primaryInputs, secondaryInputs, fluidInput, fluidOutput, _, _, _) = parseRecipe(output, recipe)
|
||||
secondaryInputs match {
|
||||
case Some(value) =>
|
||||
for (primaryInput <- primaryInputs; secondaryOutput <- value) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addFluidCannerRecipe(primaryInput, output, fluidInput.orNull, fluidOutput.orNull)
|
||||
}
|
||||
//all values required
|
||||
case _ =>
|
||||
val (primaryInputs, _, fluidInput, fluidOutput, _, eu, duration) = parseRecipe(output, recipe)
|
||||
for (primaryInput <- primaryInputs) {
|
||||
var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput)
|
||||
fluidInput match {
|
||||
case Some(fluidStack) =>
|
||||
recipe = recipe.fluidInputs(fluidStack)
|
||||
case _ =>
|
||||
}
|
||||
fluidOutput match {
|
||||
case Some(fluidStack) =>
|
||||
recipe = recipe.fluidOutputs(fluidStack)
|
||||
case _ =>
|
||||
}
|
||||
recipe.itemOutputs(output).duration(duration).eut(eu).addTo(RecipeMaps.fluidCannerRecipes)
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,7 +185,8 @@ object RecipeHandler {
|
||||
secondaryInputs match {
|
||||
case Some(value) =>
|
||||
for (primaryInput <- primaryInputs; secondaryInput <- value) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addFormingPressRecipe(primaryInput, secondaryInput, output, duration, eu)
|
||||
GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput).itemOutputs(output).duration(duration)
|
||||
.eut(eu).addTo(RecipeMaps.formingPressRecipes)
|
||||
}
|
||||
//all values required
|
||||
case _ =>
|
||||
@ -139,9 +195,16 @@ object RecipeHandler {
|
||||
|
||||
def addGTLatheRecipe(output: ItemStack, recipe: Config) {
|
||||
val (primaryInputs, _, _, _, secondaryOutputs, eu, duration) = parseRecipe(output, recipe)
|
||||
val secondaryOutput = secondaryOutputs.headOption.orNull
|
||||
val secondaryOutput = secondaryOutputs.headOption
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addLatheRecipe(primaryInput, output, secondaryOutput, duration, eu)
|
||||
var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput)
|
||||
secondaryOutput match {
|
||||
case Some(itemStack) =>
|
||||
recipe = recipe.itemOutputs(output, itemStack)
|
||||
case _ =>
|
||||
recipe = recipe.itemOutputs(output)
|
||||
}
|
||||
recipe.duration(duration).eut(eu).addTo(RecipeMaps.latheRecipes)
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,7 +213,8 @@ object RecipeHandler {
|
||||
secondaryInputs match {
|
||||
case Some(value) =>
|
||||
for (primaryInput <- primaryInputs; secondaryInput <- value) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addLaserEngraverRecipe(primaryInput, secondaryInput, output, duration, eu)
|
||||
GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput).itemOutputs(output).duration(duration)
|
||||
.eut(eu).addTo(RecipeMaps.laserEngraverRecipes)
|
||||
}
|
||||
case _ =>
|
||||
}
|
||||
@ -159,7 +223,8 @@ object RecipeHandler {
|
||||
def addGTWireMillRecipe(output: ItemStack, recipe: Config) {
|
||||
val (primaryInputs, _, _, _, _, eu, duration) = parseRecipe(output, recipe)
|
||||
for (primaryInput <- primaryInputs) {
|
||||
gregtech.api.GregTech_API.sRecipeAdder.addWiremillRecipe(primaryInput, output, duration, eu)
|
||||
GT_Values.RA.stdBuilder().itemInputs(primaryInput).itemOutputs(output).duration(duration).eut(eu)
|
||||
.addTo(RecipeMaps.wiremillRecipes)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user