Allow Empowered Void Crystal to Take Any Oil Type (#856)

[FEATURE]
This commit is contained in:
Integer Limit 2024-08-04 20:16:41 +10:00 committed by GitHub
parent 4653b62d72
commit 7f22828d8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 91 additions and 121 deletions

View File

@ -0,0 +1,90 @@
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe
import gregtech.api.items.metaitem.MetaItem
import gregtech.common.items.MetaItems
import net.minecraft.item.ItemStack
import net.minecraftforge.fluids.FluidStack
import net.minecraftforge.fluids.capability.CapabilityFluidHandler
import java.awt.Color
// Actually Additions Specific Modifications
/* Helpers */
var setupEmpowerer = { int blockItemMeta, Color particleColor ->
return mods.actuallyadditions.empowerer.recipeBuilder()
.mainInput(item('actuallyadditions:block_crystal', blockItemMeta))
.output(item('actuallyadditions:block_crystal_empowered', blockItemMeta))
.particleColor(particleColor.getRGB())
.energy(1_000_000)
.time(400)
}
var removeEmpowerer = { int blockItemMeta, ItemStack gear ->
mods.actuallyadditions.empowerer.removeByOutput(item('actuallyadditions:item_crystal_empowered', blockItemMeta))
mods.actuallyadditions.empowerer.removeByOutput(item('actuallyadditions:block_crystal_empowered', blockItemMeta))
mods.actuallyadditions.empowerer.removeByOutput(gear)
}
var setupAndRemoveEmpowerer = { int blockItemMeta, ItemStack gear, Color particleColor ->
removeEmpowerer(blockItemMeta, gear)
return setupEmpowerer(blockItemMeta, particleColor)
}
var fillMetaItem = { FluidStack toFill, MetaItem.MetaValueItem item ->
var fill = item.stackForm
var fluidCap = fill.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null)
if (fluidCap == null) return fill;
fluidCap.fill(toFill * 1000, true)
return fluidCap.container
}
/* Custom Empowerer Recipes */
// Empowered Restonia
setupAndRemoveEmpowerer(0, item('moreplates:empowered_restonia_gear'), Color.RED)
.input(ore('gemAlmandine'), ore('ingotRedAlloy'), fillMetaItem(fluid('sulfuric_acid'), MetaItems.FLUID_CELL_GLASS_VIAL), item('extendedcrafting:material', 19))
.register()
// Empowered Palis
setupAndRemoveEmpowerer(1, item('moreplates:empowered_palis_gear'), Color.BLUE)
.input(ore('gemSapphire'), item('thermalfoundation:material', 136), fillMetaItem(fluid('water'), MetaItems.FLUID_CELL), item('extendedcrafting:material', 16))
.register()
// Empowered Diamatine
setupAndRemoveEmpowerer(2, item('moreplates:empowered_diamatine_gear'), Color.CYAN)
.input(item('extendedcrafting:material', 40), item('extendedcrafting:material', 24), fillMetaItem(fluid('nitrogen_dioxide'), MetaItems.FLUID_CELL), item('extendedcrafting:material', 18))
.register()
// Empowered Void
removeEmpowerer(3, item('moreplates:empowered_void_gear'))
for (var oilType : ['oil', 'oil_heavy', 'oil_medium', 'oil_light']) {
setupEmpowerer(3, Color.DARK_GRAY)
.input(item('actuallyadditions:item_misc', 5), ore('ingotDarkSteel'), fillMetaItem(fluid(oilType), MetaItems.FLUID_CELL), item('extendedcrafting:material', 15))
.register()
}
// Empowered Emeradic
setupAndRemoveEmpowerer(4, item('moreplates:empowered_emeradic_gear'), Color.GREEN)
.input(item('nomilabs:stabilizeduranium'), ore('ingotVibrantAlloy'), fillMetaItem(fluid('argon'), MetaItems.FLUID_CELL), item('extendedcrafting:material', 17))
.register()
// Empowered Enori
setupAndRemoveEmpowerer(5, item('moreplates:empowered_enori_gear'), Color.WHITE)
.input(ore('gemApatite'), ore('ingotEndSteel'), fillMetaItem(fluid('helium'), MetaItems.FLUID_CELL), item('extendedcrafting:material', 14))
.register()
/* For EVERY Empowerer Recipe, add a Combination Crafting Recipe */
mods.actuallyadditions.empowerer.streamRecipes()
.forEach { EmpowererRecipe recipe ->
mods.extendedcrafting.combination_crafting.recipeBuilder()
.input(recipe.input.matchingStacks[0])
.pedestals(recipe.standOne.matchingStacks[0])
.pedestals(recipe.standTwo.matchingStacks[0])
.pedestals(recipe.standThree.matchingStacks[0])
.pedestals(recipe.standFour.matchingStacks[0])
.output(recipe.output)
.totalCost(4_000_000)
.costPerTick(400_000)
.register()
}

View File

@ -10,81 +10,3 @@ recipes.addShaped(<extendedcrafting:crafting_core>, [
[<ore:plateBlackSteel>, <extendedcrafting:material:10>, <ore:plateBlackSteel>],
[<extendedcrafting:material:16>, <actuallyadditions:block_empowerer>, <extendedcrafting:material:16>],
[<ore:plateBlackSteel>, <enderio:item_endergy_conduit:10>, <ore:plateBlackSteel>]]);
var outputInputMap as IIngredient[][IItemStack] = {
#Empowered Canola Seed
<actuallyadditions:item_misc:24> : [
<actuallyadditions:item_misc:23>, //crystallized canola seed
<actuallyadditions:item_canola_seed>,
<actuallyadditions:item_canola_seed>,
<actuallyadditions:item_canola_seed>,
<actuallyadditions:item_canola_seed>
],
#Empowered Restonia
<actuallyadditions:block_crystal_empowered> : [
<actuallyadditions:block_crystal>,
<ore:ingotRedAlloy>,
<ore:gemAlmandine>,
<gregtech:meta_item_1:85>.withTag({Fluid: {FluidName: "sulfuric_acid", Amount: 1000}}),
<extendedcrafting:material:19> //conflux component
],
#Empowered Palis
<actuallyadditions:block_crystal_empowered:1> : [
<actuallyadditions:block_crystal:1>,
<ore:gemSapphire>,
<ore:ingotMithril>,
<metaitem:fluid_cell>.withTag({Fluid: {FluidName: "water", Amount: 1000}}),
<extendedcrafting:material:16>
],
#Empowered Diamatine
<actuallyadditions:block_crystal_empowered:2> : [
<actuallyadditions:block_crystal:2>,
<extendedcrafting:material:40>,
<extendedcrafting:material:24>,
<metaitem:fluid_cell>.withTag({Fluid: {FluidName: "nitrogen_dioxide", Amount: 1000}}),
<extendedcrafting:material:18>
],
#Empowered Void Crystal
<actuallyadditions:block_crystal_empowered:3> : [
<actuallyadditions:block_crystal:3>,
<ore:gemQuartzBlack>,
<ore:ingotDarkSteel>,
<metaitem:fluid_cell>.withTag({Fluid: {FluidName: "oil", Amount: 1000}}),
<extendedcrafting:material:15>
],
#Empowered Emeradic
<actuallyadditions:block_crystal_empowered:4> : [
<actuallyadditions:block_crystal:4>,
<nomilabs:stabilizeduranium>,
<ore:ingotVibrantAlloy>,
<metaitem:fluid_cell>.withTag({Fluid: {FluidName: "argon", Amount: 1000}}),
<extendedcrafting:material:17>
],
#Empowered Enori
<actuallyadditions:block_crystal_empowered:5> : [
<actuallyadditions:block_crystal:5>,
<ore:gemApatite>,
<ore:ingotEndSteel>,
<metaitem:fluid_cell>.withTag({Fluid: {FluidName: "helium", Amount: 1000}}),
<extendedcrafting:material:14>
]
};
for output, inputArray in outputInputMap {
var input as IItemStack = inputArray[0];
mods.extendedcrafting.CombinationCrafting.addRecipe(
output,
4000000,
400000,
input, [
inputArray[1],
inputArray[2],
inputArray[3],
inputArray[4]
]);
}

View File

@ -11,49 +11,7 @@ mods.thermalexpansion.Compactor.removeGearRecipe(<actuallyadditions:item_crystal
mods.thermalexpansion.Compactor.removeGearRecipe(<actuallyadditions:item_crystal_empowered:4> * 4);
mods.thermalexpansion.Compactor.removeGearRecipe(<actuallyadditions:item_crystal_empowered:5> * 4);
//Empowered Restonia
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:item_crystal_empowered>);
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:block_crystal_empowered>);
mods.actuallyadditions.Empowerer.removeRecipe(<moreplates:empowered_restonia_gear>);
mods.actuallyadditions.Empowerer.addRecipe(<actuallyadditions:block_crystal_empowered>, <actuallyadditions:block_crystal>, <metaitem:gemAlmandine>, <metaitem:ingotRedAlloy>, <gregtech:meta_item_1:85>.withTag({Fluid: {FluidName: "sulfuric_acid", Amount: 1000}}), <extendedcrafting:material:19>, 1000000, 400);
//Empowered Palis
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:item_crystal_empowered:1>);
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:block_crystal_empowered:1>);
mods.actuallyadditions.Empowerer.removeRecipe(<moreplates:empowered_palis_gear>);
mods.actuallyadditions.Empowerer.addRecipe(<actuallyadditions:block_crystal_empowered:1>, <actuallyadditions:block_crystal:1>, <metaitem:gemSapphire>, <thermalfoundation:material:136>, <metaitem:fluid_cell>.withTag({Fluid: {FluidName: "water", Amount: 1000}}), <extendedcrafting:material:16>, 1000000, 400);
//Empowered Enori
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:item_crystal_empowered:5>);
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:block_crystal_empowered:5>);
mods.actuallyadditions.Empowerer.removeRecipe(<moreplates:empowered_enori_gear>);
mods.actuallyadditions.Empowerer.addRecipe(<actuallyadditions:block_crystal_empowered:5>, <actuallyadditions:block_crystal:5>, <metaitem:gemApatite>, <metaitem:nomilabs:ingotEndSteel>, <metaitem:fluid_cell>.withTag({Fluid: {FluidName: "helium", Amount: 1000}}), <extendedcrafting:material:14>, 1000000, 400);
//Empowered Void Crystal
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:item_crystal_empowered:3>);
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:block_crystal_empowered:3>);
mods.actuallyadditions.Empowerer.removeRecipe(<moreplates:empowered_void_gear>);
mods.actuallyadditions.Empowerer.addRecipe(<actuallyadditions:block_crystal_empowered:3>, <actuallyadditions:block_crystal:3>, <actuallyadditions:item_misc:5>, <metaitem:nomilabs:ingotDarkSteel>, <metaitem:fluid_cell>.withTag({Fluid: {FluidName: "oil", Amount: 1000}}), <extendedcrafting:material:15>, 1000000, 400);
//Empowered Diamatine
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:item_crystal_empowered:2>);
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:block_crystal_empowered:2>);
mods.actuallyadditions.Empowerer.removeRecipe(<moreplates:empowered_diamatine_gear>);
mods.actuallyadditions.Empowerer.addRecipe(<actuallyadditions:block_crystal_empowered:2>, <actuallyadditions:block_crystal:2>, <extendedcrafting:material:40>, <extendedcrafting:material:24>, <metaitem:fluid_cell>.withTag({Fluid: {FluidName: "nitrogen_dioxide", Amount: 1000}}), <extendedcrafting:material:18>, 1000000, 400);
//Empowered Emerald
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:item_crystal_empowered:4>);
mods.actuallyadditions.Empowerer.removeRecipe(<actuallyadditions:block_crystal_empowered:4>);
mods.actuallyadditions.Empowerer.removeRecipe(<moreplates:empowered_emeradic_gear>);
mods.actuallyadditions.Empowerer.addRecipe(<actuallyadditions:block_crystal_empowered:4>, <actuallyadditions:block_crystal:4>, <nomilabs:stabilizeduranium>, <metaitem:nomilabs:ingotVibrantAlloy>, <metaitem:fluid_cell>.withTag({Fluid: {FluidName: "argon", Amount: 1000}}), <extendedcrafting:material:17>, 1000000, 400);
// Empowerer Recipes (Moved to Groovy)
//Black Quartz
electrolyzer.recipeBuilder()