Version 1.0.19b

This commit is contained in:
Adrian Marquis
2023-05-29 13:49:34 +00:00
parent 5386f164b9
commit b5ede55eba
927 changed files with 92525 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
// priority: 1000
global['auTags'] = []
global['loaded'] = {
IE_Loaded: Platform.isLoaded('immersiveengineering'),
Mek_Loaded: Platform.isLoaded('mekanism'),
Create_Loaded: Platform.isLoaded('create'),
CreateAdd_Loaded: Platform.isLoaded('createaddition'),
Thermal_Loaded: false,
FTBIC_Loaded: Platform.isLoaded('ftbic'),
Tinkers_Loaded: Platform.isLoaded('tconstruct'),
Occult_Loaded: Platform.isLoaded('occultism'),
ATO_Loaded: Platform.isLoaded('alltheores')
}
global['alloys'] = [
'steel',
'invar',
'electrum',
'bronze',
'enderium',
'lumium',
'signalum',
'constantan',
'brass'
]
global['blueskies'] = [
'aquite',
'charoite',
'falsite',
'horizonite',
'ventium'
]
global['ingredientCheck'] = function(itemstack, json) {
if(json.has('tag')) {
let tag = json.get('tag').getAsString()
if (AlmostUnified.getItemIds(tag).contains(itemstack.id)) { return true }
} else if (json.has('item')) {
let item = json.get('item').getAsString()
if (itemstack.id == item) { return true }
}
return false
}
ServerEvents.recipes(event => {
global.auTags = AlmostUnified.getTags()
})

View File

@@ -0,0 +1,135 @@
// priority:950
// Written by EnigmaQuip as a post almost unified recipe generation script for missing recipes
ServerEvents.recipes(event => {
if (global.devLogging) {
console.log('Finishing Unifying on Dusts')
}
let dustTags = global.auTags.filter(function (val) {
return /forge:dusts/.test(val)
})
let dustCount = {
occult: 0,
ftbic: 0
}
dustTags.forEach(dustTagString => {
let material = dustTagString.replace('forge:dusts/', '')
let dust = AlmostUnified.getPreferredItemForTag(dustTagString)
if (dust.isEmpty()) {
console.log(`${material} does not have a dust tag entry`)
return
}
let ingot = AlmostUnified.getPreferredItemForTag(`forge:ingots/${material}`)
let ore = AlmostUnified.getPreferredItemForTag(`forge:ores/${material}`)
let raw_material = AlmostUnified.getPreferredItemForTag(`forge:raw_materials/${material}`)
let raw_block = AlmostUnified.getPreferredItemForTag(`forge:storage_blocks/raw_${material}`)
// Occultism Crusher
if (global.loaded.Occult_Loaded) {
let crush = {
ingot: false,
ore: false,
raw: false
}
event.forEachRecipe({ type: "occultism:crushing" }, recipe => {
let recipeJson = recipe.json
if (dust.equalsIgnoringCount(Item.of(recipeJson.get('result')))) {
let input = recipeJson.get('ingredient')
if (!ingot.isEmpty() && global.ingredientCheck(ingot, input)) {
crush.ingot = true
} else if (!ore.isEmpty() && global.ingredientCheck(ore, input)) {
crush.ore = true
} else if (!raw_material.isEmpty() && global.ingredientCheck(raw_material, input)) {
crush.raw = true
}
}
})
let recipe = {
type: "occultism:crushing",
ingredient: {},
result: {},
crushing_time: 200,
ignore_crushing_multiplier: true
}
if (!ingot.isEmpty() && !crush.ingot) {
let ingotRecipe = recipe
ingotRecipe.ingredient = Ingredient.of(`#forge:ingots/${material}`).toJson()
ingotRecipe.result = dust.withCount(1).toJson()
event.custom(ingotRecipe).id(`kubejs:occultism/crushing/${material}_dust_from_ingot`)
dustCount.occult++
}
if (!raw_material.isEmpty() && !crush.raw) {
let rawRecipe = recipe
rawRecipe.ingredient = Ingredient.of(`#forge:raw_materials/${material}`).toJson()
rawRecipe.result = dust.withCount(2).toJson()
rawRecipe.ignore_crushing_multiplier = false
event.custom(rawRecipe).id(`kubejs:occultism/crushing/${material}_dust_from_raw_material`)
dustCount.occult++
}
if (!ore.isEmpty() && !crush.ore) {
let oreRecipe = recipe
oreRecipe.ingredient = Ingredient.of(`#forge:ores/${material}`).toJson()
oreRecipe.result = dust.withCount(2).toJson()
oreRecipe.crushing_time = 300
oreRecipe.ignore_crushing_multiplier = false
event.custom(oreRecipe).id(`kubejs:occultism/crushing/${material}_dust`)
dustCount.occult++
}
}
// FTBIC Macerating
if (global.loaded.FTBIC_Loaded) {
let macerate = {
ingot: false,
ore: false,
raw: false,
}
event.forEachRecipe({ type: 'ftbic:macerating' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('outputItems').forEach(item => {
if (dust.equalsIgnoringCount(Item.of(item))) {
recipeJson.get('inputItems').forEach(inputJson => {
let input = inputJson.get('ingredient')
if (!ingot.isEmpty() && global.ingredientCheck(ingot, input)) {
macerate.ingot = true
} else if (!ore.isEmpty() && global.ingredientCheck(ore, input)) {
macerate.ore = true
} else if (!raw_material.isEmpty() && global.ingredientCheck(raw_material, input)) {
macerate.raw = true
}
})
}
})
})
if (!ingot.isEmpty() && !macerate.ingot) {
event.custom({
"type": "ftbic:macerating",
"inputItems": [{ count: 1, ingredient: Ingredient.of(`#forge:ingots/${material}`).toJson() }],
"outputItems": [dust.toJson()]
}).id(`kubejs:ftbic/macerating/ingots/${material}_to_dust`)
dustCount.ftbic++
}
if (!ore.isEmpty() && !macerate.ore) {
event.custom({
"type": "ftbic:macerating",
"inputItems": [{ count: 1, ingredient: Ingredient.of(`#forge:ores/${material}`).toJson() }],
"outputItems": [dust.withCount(2).toJson()]
}).id(`kubejs:ftbic/macerating/ores/${material}_to_dust`)
dustCount.ftbic++
}
if (!raw_material.isEmpty() && !macerate.raw) {
event.custom({
"type": "ftbic:macerating",
"inputItems": [{ count: 1, ingredient: Ingredient.of(`#forge:raw_materials/${material}`).toJson() }],
"outputItems": [
dust.toJson(),
{ chance: 0.35, item: dust.id }
]
}).id(`kubejs:ftbic/macerating/raw_materials/${material}_to_dust`)
dustCount.ftbic++
}
}
})
if (global.devLogging) {
console.log(`Added Dust Recipes - FTBIC: ${dustCount.ftbic}, Occultism: ${dustCount.occult}`)
// Added Dust Recipes - FTBIC: 52, Occultism: 63
}
})

View File

@@ -0,0 +1,108 @@
//priority:400
// Written by EnigmaQuip as a post almost unified recipe generation script for missing recipes
ServerEvents.recipes(event => {
if (global.devLogging) {
console.log('Finishing Unifying on Gears')
}
let gearTags = global.auTags.filter(function (val) {
return /forge:gears/.test(val)
})
let gearCount = {
ftbic: 0,
ie: 0,
thermal: 0
}
gearTags.forEach(gearTagString => {
let material = gearTagString.replace('forge:gears/', '')
let gear = AlmostUnified.getPreferredItemForTag(gearTagString)
if (gear.isEmpty()) {
console.log(`${material} does not have a gear tag entry`)
return
}
let ingotTagString = `forge:ingots/${material}`
if (AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
ingotTagString = `forge:gems/${material}`
}
if (!AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
let ingotTag = Ingredient.of(`#${ingotTagString}`)
if (global.loaded.IE_Loaded) {
// Check if ie metal press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'immersiveengineering:metal_press' }, recipe => {
let recipeJson = recipe.json
let result = recipeJson.get('result')
if (result.has('base_ingredient')) {
if (global.ingredientCheck(gear, result.get('base_ingredient'))) {
count++
}
} else if (global.ingredientCheck(gear, result)) {
count++
}
})
if (count == 0) {
event.custom({
type: 'immersiveengineering:metal_press',
mold: 'immersiveengineering:mold_gear',
input: {
count: 4,
base_ingredient: ingotTag.toJson()
},
result: gear.toJson(),
energy: 2400
}).id(`kubejs:immersiveengineering/metalpress/gear_${material}`)
gearCount.ie++
}
}
if (global.loaded.Thermal_Loaded) {
// Check if thermal multiservo press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'thermal:press' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('result').forEach(item => {
if (gear.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'thermal:press',
ingredients: [
ingotTag.withCount(4).toJson(),
Ingredient.of('thermal:press_gear_die').toJson(),
],
result: [gear.toJson()],
}).id(`kubejs:thermal/machines/press/press_${material}_ingot_to_gear`)
gearCount.thermal++
}
}
}
if (global.loaded.FTBIC_Loaded) {
let plateTag = Ingredient.of(`#forge:plates/${material}`)
if (!AlmostUnified.getPreferredItemForTag(`forge:plates/${material}`).isEmpty()) {
// Check if ftbic extruding recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'ftbic:extruding' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('outputItems').forEach(item => {
if (gear.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'ftbic:extruding',
inputItems: [{ "count": 4, "ingredient": plateTag.toJson() }],
outputItems: [gear.withCount(1).toJson()]
}).id(`kubejs:ftbic/extruding/ingots/${material}_to_${material}_gear`)
gearCount.ftbic++
}
}
}
})
if (global.devLogging) {
console.log(`Added Gear Recipes - FTBIC: ${gearCount.ftbic}, IE: ${gearCount.ie}, Thermal: ${gearCount.thermal}`)
// Added Gear Recipes - FTBIC: 16, IE: 8, Thermal: 0
}
})

View File

@@ -0,0 +1,162 @@
//priority:700
// Written by EnigmaQuip as a post almost unified recipe generation script for missing recipes
// Missing tags for unify
ServerEvents.tags('item', event => {
['falsite', 'ventium', 'horizonite'].forEach(metal => {
event.add(`forge:ingots/${metal}`, `blue_skies:${metal}_ingot`)
})
})
ServerEvents.recipes(event => {
if (global.devLogging) {
console.log('Finishing Unifying on Ingots')
}
let ingotTags = global.auTags.filter(function (val) {
return /forge:ingots/.test(val)
})
let ingotCount = {
ie: 0,
thermal: 0
}
ingotTags.forEach(ingotTagString => {
let material = ingotTagString.replace('forge:ingots/', '')
let ingot = AlmostUnified.getPreferredItemForTag(ingotTagString)
if (ingot.isEmpty()) {
console.log(`${material} does not have a ingot tag entry`)
return
}
let isAlloy = global.alloys.includes(material)
let storageTag = Ingredient.of(`#forge:storage_blocks/${material}`)
if (!AlmostUnified.getPreferredItemForTag(`forge:storage_blocks/${material}`).isEmpty()) {
if (global.loaded.IE_Loaded) {
// Check if ie metal press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'immersiveengineering:metal_press' }, recipe => {
let recipeJson = recipe.json
let result = recipeJson.get('result')
if (result.has('base_ingredient')) {
if (global.ingredientCheck(ingot, result.get('base_ingredient'))) {
count++
}
} else if (global.ingredientCheck(ingot, result)) {
count++
}
})
if (count == 0) {
let recipe = {
type: 'immersiveengineering:metal_press',
mold: 'immersiveengineering:mold_unpacking',
input: storageTag.toJson(),
result: ingot.withCount(9).toJson(),
energy: 2400
}
event.custom(recipe).id(`kubejs:immersiveengineering/metalpress/unpacking/block_${material}`)
ingotCount.ie++
}
}
if (global.loaded.Thermal_Loaded) {
// Check if thermal multiservo press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'thermal:press' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('result').forEach(item => {
if (ingot.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'thermal:press',
ingredients: [
storageTag.toJson(),
Ingredient.of('thermal:press_unpacking_die').toJson(),
],
result: [ingot.withCount(9).toJson()],
}).id(`kubejs:thermal/machines/press/unpacking/press_${material}_unpacking`)
ingotCount.thermal++
}
}
}
let nuggetTag = Ingredient.of(`#forge:nuggets/${material}`)
if (!AlmostUnified.getPreferredItemForTag(`forge:nuggets/${material}`).isEmpty()) {
if (global.loaded.IE_Loaded) {
// Check if ie metal press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'immersiveengineering:metal_press' }, recipe => {
let recipeJson = recipe.json
let result = recipeJson.get('result')
if (result.has('base_ingredient')) {
if (global.ingredientCheck(ingot, result.get('base_ingredient'))) {
count++
}
} else if (global.ingredientCheck(ingot, result)) {
count++
}
})
if (count == 0) {
event.custom({
type: 'immersiveengineering:metal_press',
mold: 'immersiveengineering:mold_packing_9',
input: {
count: 9,
base_ingredient: nuggetTag.toJson()
},
result: ingot.toJson(),
energy: 2400
}).id(`kubejs:immersiveengineering/metalpress/packing3x3/${material}_nugget`)
ingotCount.ie++
}
}
if (global.loaded.Thermal_Loaded) {
// Check if thermal multiservo press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'thermal:press' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('result').forEach(item => {
if (ingot.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'thermal:press',
ingredients: [
nuggetTag.withCount(9).toJson(),
Ingredient.of('thermal:press_packing_3x3_die').toJson(),
],
result: [ingot.toJson()],
}).id(`kubejs:thermal/machines/press/packing3x3/press_${material}_nugget_packing`)
ingotCount.thermal++
}
}
}
if (isAlloy) {
/*
TODO include alloying recipes across all alloying machines
create mixing
thermal induction smelter
ie alloy kiln
ie arc furnace
*/
} else {
/*
TODO include/check ore/raw/raw_storage/chunk/dust to ingot recipes that might be missing
most take their recipes from vanilla smelting/blasting
special cases:
ie arc furnace
dust -> ingot
ore -> 2 ingot, 1 ie slag
raw ore -> 1 ingot, 1 ingot (50%)
raw ore storage -> 13 ingots, 1 ingot (50%)
thermal induction smelter
*/
}
})
if (global.devLogging) {
console.log(`Added Ingot Recipes - IE: ${ingotCount.ie}, Thermal: ${ingotCount.thermal}`)
// Added Ingot Recipes - IE: 68, Thermal: 0
}
})

View File

@@ -0,0 +1,89 @@
//priority:650
// Written by EnigmaQuip as a post almost unified recipe generation script for missing recipes
// Missing tags for unify
ServerEvents.tags('item', event => {
['falsite', 'ventium', 'horizonite'].forEach(metal => {
event.add(`forge:nuggets/${metal}`, `blue_skies:${metal}_nugget`)
})
})
ServerEvents.recipes(event => {
if (global.devLogging) {
console.log('Finishing Unifying on Nuggets')
}
let nuggetTags = global.auTags.filter(function (val) {
return /forge:nuggets/.test(val)
})
let nuggetCount = {
ie: 0,
thermal: 0
}
nuggetTags.forEach(nuggetTagString => {
let material = nuggetTagString.replace('forge:nuggets/', '')
let nugget = AlmostUnified.getPreferredItemForTag(nuggetTagString)
if (nugget.isEmpty()) {
console.log(`${material} does not have a nugget tag entry`)
return
}
let ingotTagString = `forge:ingots/${material}`
if (AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
ingotTagString = `forge:gems/${material}`
}
if (!AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
let ingotTag = Ingredient.of(`#${ingotTagString}`)
if (global.loaded.IE_Loaded) {
// Check if ie metal press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'immersiveengineering:metal_press' }, recipe => {
let recipeJson = recipe.json
let result = recipeJson.get('result')
if (result.has('base_ingredient')) {
if (global.ingredientCheck(nugget, result.get('base_ingredient'))) {
count++
}
} else if (global.ingredientCheck(nugget, result)) {
count++
}
})
if (count == 0) {
event.custom({
type: 'immersiveengineering:metal_press',
mold: 'immersiveengineering:mold_unpacking',
input: ingotTag.toJson(),
result: nugget.withCount(9).toJson(),
energy: 2400
}).id(`kubejs:immersiveengineering/metalpress/unpacking/nugget_${material}`)
nuggetCount.ie++
}
}
if (global.loaded.Thermal_Loaded) {
// Check if thermal multiservo press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'thermal:press' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('result').forEach(item => {
if (nugget.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'thermal:press',
ingredients: [
ingotTag.toJson(),
Ingredient.of('thermal:press_unpacking_die').toJson(),
],
result: [nugget.withCount(9).toJson()],
}).id(`kubejs:thermal/machines/press/unpacking/press_${material}_nugget_unpacking`)
nuggetCount.thermal++
}
}
}
})
if (global.devLogging) {
console.log(`Added Nugget Recipes - IE: ${nuggetCount.ie}, Thermal: ${nuggetCount.thermal}`)
// Added Nugget Recipes - IE: 32, Thermal: 0
}
})

View File

@@ -0,0 +1,121 @@
//priority:500
// Written by EnigmaQuip as a post almost unified recipe generation script for missing recipes
ServerEvents.recipes(event => {
if (global.devLogging) {
console.log('Finishing Unifying on Plates')
}
let plateTags = global.auTags.filter(function (val) {
return /forge:plates/.test(val)
})
let plateCount = {
create: 0,
ftbic: 0,
ie: 0,
thermal: 0
}
plateTags.forEach(plateTagString => {
let material = plateTagString.replace('forge:plates/', '')
//if (material == 'obsidian') { return }
let plate = AlmostUnified.getPreferredItemForTag(plateTagString)
if (plate.isEmpty()) {
console.log(`${material} does not have a plate tag entry`)
return
}
let ingotTagString = `forge:ingots/${material}`
if (AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
ingotTagString = `forge:gems/${material}`
}
if (!AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
let ingotTag = Ingredient.of(`#${ingotTagString}`)
if (global.loaded.Create_Loaded) {
// Check if create press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'create:pressing' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('results').forEach(item => {
if (plate.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'create:pressing',
ingredients: [ingotTag.toJson()],
results: [plate.withCount(1).toJson()]
}).id(`kubejs:create/pressing/${material}_ingot`)
plateCount.create++
}
}
if (global.loaded.FTBIC_Loaded) {
// Check if ftbic rolling recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'ftbic:rolling' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('outputItems').forEach(item => {
if (plate.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'ftbic:rolling',
inputItems: [{ "count": 1, "ingredient": ingotTag.toJson() }],
outputItems: [plate.withCount(1).toJson()]
}).id(`kubejs:ftbic/rolling/ingots/${material}_to_${material}_plate`)
plateCount.ftbic++
}
}
if (global.loaded.IE_Loaded) {
// Check if ie metal press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'immersiveengineering:metal_press' }, recipe => {
let recipeJson = recipe.json
let result = recipeJson.get('result')
if (result.has('base_ingredient')) {
if (global.ingredientCheck(plate, result.get('base_ingredient'))) {
count++
}
} else if (global.ingredientCheck(plate, result)) {
count++
}
})
if (count == 0) {
event.custom({
type: 'immersiveengineering:metal_press',
mold: 'immersiveengineering:mold_plate',
input: ingotTag.toJson(),
result: plate.toJson(),
energy: 2400
}).id(`kubejs:immersiveengineering/metalpress/plate_${material}`)
plateCount.ie++
}
}
if (global.loaded.Thermal_Loaded) {
// Check if thermal multiservo press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'thermal:press' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('result').forEach(item => {
if (plate.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'thermal:press',
ingredient: ingotTag.toJson(),
result: [plate.toJson()],
}).id(`kubejs:thermal/machines/press/press_${material}_ingot_to_plate`)
plateCount.thermal++
}
}
}
})
if (global.devLogging) {
console.log(`Added Plate Recipes - Create: ${plateCount.create}, FTBIC: ${plateCount.ftbic}, IE: ${plateCount.ie}, Thermal: ${plateCount.thermal}`)
// Added Plate Recipes - Create: 23, FTBIC: 18, IE: 8, Thermal: 0
}
})

View File

@@ -0,0 +1,85 @@
//priority:550
// Written by EnigmaQuip as a post almost unified recipe generation script for missing recipes
// Missing tags for unify
ServerEvents.tags('item', event => {
global.blueskies.forEach(metal => {
event.add(`forge:raw_materials/${metal}`, `blue_skies:raw_${metal}`)
})
})
ServerEvents.recipes(event => {
if (global.devLogging) {
console.log('Finishing Unifying on Raw Materials')
}
let raw_materialTags = global.auTags.filter(function (val) {
return /forge:raw_materials/.test(val)
})
let raw_materialCount = {
ie: 0,
thermal: 0
}
raw_materialTags.forEach(raw_materialTagString => {
let material = raw_materialTagString.replace('forge:raw_materials/', '')
let raw_material = AlmostUnified.getPreferredItemForTag(raw_materialTagString)
if (raw_material.isEmpty()) {
console.log(`${material} does not have a raw_material tag entry`)
return
}
if (!AlmostUnified.getPreferredItemForTag(`forge:storage_blocks/raw_${material}`).isEmpty()) {
let rawblockTag = Ingredient.of(`#forge:storage_blocks/raw_${material}`)
if (global.loaded.IE_Loaded) {
// Check if ie metal press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'immersiveengineering:metal_press' }, recipe => {
let recipeJson = recipe.json
let result = recipeJson.get('result')
if (result.has('base_ingredient')) {
if (global.ingredientCheck(raw_material, result.get('base_ingredient'))) {
count++
}
} else if (global.ingredientCheck(raw_material, result)) {
count++
}
})
if (count == 0) {
event.custom({
type: 'immersiveengineering:metal_press',
mold: 'immersiveengineering:mold_unpacking',
input: rawblockTag.toJson(),
result: raw_material.withCount(9).toJson(),
energy: 2400
}).id(`kubejs:immersiveengineering/metalpress/raw_material_${material}`)
raw_materialCount.ie++
}
}
if (global.loaded.Thermal_Loaded) {
// Check if thermal multiservo press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'thermal:press' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('result').forEach(item => {
if (raw_material.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'thermal:press',
ingredients: [
rawblockTag.toJson(),
Ingredient.of('thermal:press_unpacking_die').toJson(),
],
result: [raw_material.withCount(9).toJson()],
}).id(`kubejs:thermal/machines/press/unpacking/press_raw_${material}_unpacking`)
raw_materialCount.thermal++
}
}
}
})
if (global.devLogging) {
console.log(`Added Raw Material Recipes - IE: ${raw_materialCount.ie}, Thermal: ${raw_materialCount.thermal}`)
// Added Raw Material Recipes - IE: 23, Thermal: 0
}
})

View File

@@ -0,0 +1,111 @@
//priority:450
// Written by EnigmaQuip as a post almost unified recipe generation script for missing recipes
ServerEvents.recipes(event => {
if (global.devLogging) {
console.log('Finishing Unifying on Rods')
}
let rodTags = global.auTags.filter(function (val) {
return /forge:rods/.test(val)
})
let rodCount = {
create: 0,
ftbic: 0,
ie: 0,
thermal: 0
}
rodTags.forEach(rodTagString => {
let material = rodTagString.replace('forge:rods/', '')
let rod = AlmostUnified.getPreferredItemForTag(rodTagString)
if (rod.isEmpty()) {
console.log(`${material} does not have a rod tag entry`)
return
}
let ingotTagString = `forge:ingots/${material}`
if (AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
ingotTagString = `forge:gems/${material}`
}
if (!AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
let ingotTag = Ingredient.of(`#${ingotTagString}`)
if (global.loaded.CreateAdd_Loaded) {
// Check if create additions rolling recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'createaddition:rolling' }, recipe => {
let recipeJson = recipe.json
if (global.ingredientCheck(rod, recipeJson.get('result'))) {
count++
}
})
if (count == 0) {
event.custom({
type: 'createaddition:rolling',
input: ingotTag.toJson(),
result: rod.withCount(2).toJson()
}).id(`kubejs:createaddition/rolling/${material}_ingot`)
rodCount.create++
}
}
if (global.loaded.FTBIC_Loaded) {
// Check if ftbic extruding recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'ftbic:extruding' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('outputItems').forEach(item => {
if (rod.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'ftbic:extruding',
inputItems: [{ "count": 1, "ingredient": ingotTag.toJson() }],
outputItems: [rod.withCount(2).toJson()]
}).id(`kubejs:ftbic/extruding/ingots/${material}_to_${material}_rod`)
rodCount.ftbic++
}
}
if (global.loaded.IE_Loaded) {
// Check if ie metal press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'immersiveengineering:metal_press' }, recipe => {
let recipeJson = recipe.json
let result = recipeJson.get('result')
if (result.has('base_ingredient')) {
if (global.ingredientCheck(rod, result.get('base_ingredient'))) {
count++
}
} else if (global.ingredientCheck(rod, result)) {
count++
}
})
if (count == 0) {
event.custom({
type: 'immersiveengineering:metal_press',
mold: 'immersiveengineering:mold_rod',
input: ingotTag.toJson(),
result: {
count: 2,
base_ingredient: rod.toJson()
},
energy: 2400
}).id(`kubejs:immersiveengineering/metalpress/rod_${material}`)
rodCount.ie++
}
}
/*
if (global.loaded.Thermal_Loaded) {
// add blast chiller recipes? cross check with tconstruct
}*/
// remove crafting recipes not using atm hammer
event.forEachRecipe({ type: 'minecraft:crafting_shaped', output: rod }, recipe => {
if (!recipe.hasInput('#alltheores:ore_hammers')) {
event.remove({ id: recipe.getId() })
}
})
}
})
if (global.devLogging) {
console.log(`Added Rod Recipes - CreateAdditions: ${rodCount.create}, FTBIC: ${rodCount.ftbic}, IE: ${rodCount.ie}, Thermal: ${rodCount.thermal}`)
// Added Rod Recipes - CreateAdditions: 20, FTBIC: 16, IE: 8, Thermal: 0
}
})

View File

@@ -0,0 +1,103 @@
//priority:900
// Written by EnigmaQuip as a post almost unified recipe generation script for missing recipes
// Missing tags for unify
ServerEvents.tags('item', event => {
event.add('forge:storage_blocks/raw_aluminum', 'xycraft_world:aluminum_raw_block')
global.blueskies.forEach(metal => {
event.add(`forge:storage_blocks/raw_${metal}`, `blue_skies:raw_${metal}_block`)
event.add(`forge:storage_blocks/${metal}`, `blue_skies:${metal}_block`)
event.add(`forge:storage_blocks/raw_materials`, `blue_skies:raw_${metal}_block`)
})
})
ServerEvents.recipes(event => {
if (global.devLogging) {
console.log('Finishing Unifying on Storage Blocks')
}
let storageTags = global.auTags.filter(function (val) {
return /forge:storage_blocks/.test(val)
})
let storageCount = {
ie: 0,
thermal: 0
}
storageTags.forEach(storageTagString => {
let material = storageTagString.replace('forge:storage_blocks/', '')
let raw = false
if (/raw_/.test(material)) {
raw = true
material = material.replace('raw_', '')
}
let storage = AlmostUnified.getPreferredItemForTag(storageTagString)
if (storage.isEmpty()) {
console.log(`${material} does not have a storage_blocks tag entry`)
return
}
let ingotTagString = `forge:ingots/${material}`
if (AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
ingotTagString = `forge:gems/${material}`
}
if (raw) {
ingotTagString = `forge:raw_materials/${material}`
}
if (!AlmostUnified.getPreferredItemForTag(ingotTagString).isEmpty()) {
let ingotTag = Ingredient.of(`#${ingotTagString}`)
if (global.loaded.IE_Loaded) {
// Check if ie metal press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'immersiveengineering:metal_press' }, recipe => {
let recipeJson = recipe.json
let result = recipeJson.get('result')
if (result.has('base_ingredient')) {
if (global.ingredientCheck(storage, result.get('base_ingredient'))) {
count++
}
} else if (global.ingredientCheck(storage, result)) {
count++
}
})
if (count == 0) {
event.custom({
type: 'immersiveengineering:metal_press',
mold: 'immersiveengineering:mold_packing_9',
input: {
count: 9,
base_ingredient: ingotTag.toJson()
},
result: storage.toJson(),
energy: 2400
}).id(`kubejs:immersiveengineering/metalpress/packing3x3/${raw ? 'raw_' : ''}${material}`)
storageCount.ie++
}
}
if (global.loaded.Thermal_Loaded) {
// Check if thermal multiservo press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'thermal:press' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('result').forEach(item => {
if (storage.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'thermal:press',
ingredients: [
ingotTag.withCount(9).toJson(),
Ingredient.of('thermal:press_packing_3x3_die').toJson(),
],
result: [storage.toJson()],
}).id(`kubejs:thermal/machines/press/packing3x3/press_${raw ? 'raw_' : ''}${material}_packing`)
storageCount.thermal++
}
}
}
})
if (global.devLogging) {
console.log(`Added Storage Block Recipes - IE: ${storageCount.ie}, Thermal: ${storageCount.thermal}`)
// Added Storage Block Recipes - IE: 62, Thermal: 0
}
})

View File

@@ -0,0 +1,113 @@
//priority:950
// Written by EnigmaQuip as a post almost unified recipe generation script for missing recipes
// Missing tags for unify
ServerEvents.tags('item', event => {
event.add('forge:wires/aluminum', 'ftbic:aluminum_wire')
event.add('forge:wires/copper', 'ftbic:copper_wire')
event.add('forge:wires/gold', 'ftbic:gold_wire')
event.add('forge:wires/enderium', 'ftbic:enderium_wire')
})
ServerEvents.recipes(event => {
if (global.devLogging) {
console.log('Finishing Unifying on Wires')
}
let wireTags = global.auTags.filter(function (val) {
return /forge:wires/.test(val)
})
let wireCount = {
create: 0,
ftbic: 0,
ie: 0,
thermal: 0
}
wireTags.forEach(wireTagString => {
let material = wireTagString.replace('forge:wires/', '')
let wire = AlmostUnified.getPreferredItemForTag(wireTagString)
if (wire.isEmpty()) {
console.log(`${material} does not have a wire tag entry`)
return
}
if (global.loaded.CreateAdd_Loaded) {
let plate = AlmostUnified.getPreferredItemForTag(`forge:plates/${material}`)
if (!plate.isEmpty()) {
// Check if create additions rolling recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'createaddition:rolling' }, recipe => {
let recipeJson = recipe.json
if (wire.equalsIgnoringCount(Item.of(recipeJson.get('result')))) {
count++
}
})
if (count == 0) {
event.custom({
type: 'createaddition:rolling',
input: Ingredient.of(`#forge:plates/${material}`).toJson(),
result: wire.withCount(2).toJson()
}).id(`kubejs:createaddition/rolling/${material}_plate`)
wireCount.create++
}
}
}
if (global.loaded.FTBIC_Loaded) {
let rod = AlmostUnified.getPreferredItemForTag(`forge:rods/${material}`)
if (!rod.isEmpty()) {
// Check if ftbic extruding recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'ftbic:extruding' }, recipe => {
let recipeJson = recipe.json
recipeJson.get('outputItems').forEach(item => {
if (wire.equalsIgnoringCount(Item.of(item))) {
count++
}
})
})
if (count == 0) {
event.custom({
type: 'ftbic:extruding',
inputItems: [{ "count": 1, "ingredient": Ingredient.of(`#forge:rods/${material}`).toJson() }],
outputItems: [wire.withCount(2).toJson()]
}).id(`kubejs:ftbic/extruding/rods/${material}_to_${material}_wire`)
wireCount.ftbic++
}
}
}
if (global.loaded.IE_Loaded) {
let ingot = AlmostUnified.getPreferredItemForTag(`forge:ingots/${material}`)
if (!ingot.isEmpty()) {
// Check if ie metal press recipe exists and add it if not
let count = 0
event.forEachRecipe({ type: 'immersiveengineering:metal_press' }, recipe => {
let recipeJson = recipe.json
let result = recipeJson.get('result')
if (result.has('base_ingredient')) {
if (global.ingredientCheck(wire, result.get('base_ingredient'))) {
count++
}
} else if (global.ingredientCheck(wire, result)) {
count++
}
})
if (count == 0) {
event.custom({
type: 'immersiveengineering:metal_press',
mold: 'immersiveengineering:mold_wire',
input: Ingredient.of(`#forge:ingots/${material}`).toJson(),
result: {
count: 2,
base_ingredient: wire.toJson()
},
energy: 2400
}).id(`kubejs:immersiveengineering/metalpress/wire_${material}`)
wireCount.ie++
}
}
}
})
if (global.devLogging) {
console.log(`Added Wire Recipes - CreateAdditions: ${wireCount.create}, FTBIC: ${wireCount.ftbic}, IE: ${wireCount.ie}`)
// Added Wire Recipes - CreateAdditions: 2, FTBIC: 4, IE: 1
}
})