diff --git a/kubejs/server_scripts/ae2/recipes.js b/kubejs/server_scripts/ae2/recipes.js index 10034f0da..d46f82a6a 100644 --- a/kubejs/server_scripts/ae2/recipes.js +++ b/kubejs/server_scripts/ae2/recipes.js @@ -2329,8 +2329,14 @@ const registerAE2Recipes = (event) => { E: 'ae2:silicon_press' }).id('tfg:shaped/not_so_mysterious_cube') - event.recipes.gtceu.macerator('sky_stone') - .itemInputs('#tfg:stone_composition/suevite') + event.recipes.gtceu.macerator('tfg:sky_stone') + .itemInputs('#tfg:stone_types/suevite') + .itemOutputs('ae2:sky_dust') + .EUt(2) + .duration(100) + + event.recipes.gtceu.macerator('tfg:sky_stone_slab') + .itemInputs('2x #tfg:stone_types/suevite') .itemOutputs('ae2:sky_dust') .EUt(2) .duration(100) diff --git a/kubejs/server_scripts/create/recipes.js b/kubejs/server_scripts/create/recipes.js index bd2a4879a..fdef68334 100644 --- a/kubejs/server_scripts/create/recipes.js +++ b/kubejs/server_scripts/create/recipes.js @@ -50,7 +50,7 @@ const registerCreateRecipes = (event) => { { id: 'create:crafting/logistics/stock_ticker_clear'}, { id: 'create:crafting/logistics/factory_gauge_clear'}, { output: '#create:table_cloths'}, // Gotta do this to not purge the table cloth reset recipes - { type: 'minecraft:stonecutting' } + //{ type: 'minecraft:stonecutting' } ], mod: 'create' }) // Make Bound Cardboard craftable with all string diff --git a/kubejs/server_scripts/tfg/natural_blocks/recipes.collapse.js b/kubejs/server_scripts/tfg/natural_blocks/recipes.collapse.js index 802cbadb7..584b4cf1f 100644 --- a/kubejs/server_scripts/tfg/natural_blocks/recipes.collapse.js +++ b/kubejs/server_scripts/tfg/natural_blocks/recipes.collapse.js @@ -34,7 +34,9 @@ function registerTFGCollapseRecipes(event) { }) } - event.recipes.tfc.collapse(rock.cobble.block, `#forge:ores_in_ground/${rockId}`) + if (Ingredient.of(`#forge:ores_in_ground/${rockId}`).itemIds.toArray().length > 0) { + event.recipes.tfc.collapse(rock.cobble.block, `#forge:ores_in_ground/${rockId}`) + } event.recipes.tfc.landslide(rock.cobble.block, rock.cobble.block); diff --git a/kubejs/server_scripts/tfg/natural_blocks/recipes.rocks.js b/kubejs/server_scripts/tfg/natural_blocks/recipes.rocks.js index e81bcb904..9762e09c8 100644 --- a/kubejs/server_scripts/tfg/natural_blocks/recipes.rocks.js +++ b/kubejs/server_scripts/tfg/natural_blocks/recipes.rocks.js @@ -356,29 +356,27 @@ function registerTFGRockRecipes(event) { } // Pillars - if (rock.bricks != null && rock.pillar != null) { - event.shaped(`2x ${rock.pillar}`, [ - 'A', - 'A' - ], { - A: rock.bricks.block - }) - .id(`tfg:shaped/${rockId}_pillar`); - - event.stonecutting(rock.pillar, rock.bricks.block) - .id(`tfg:stonecutting/${rockId}_pillar`); + if (rock.pillar != null) { + if (rock.bricks != null) { + event.shaped(`2x ${rock.pillar}`, [ + 'A', + 'A' + ], { + A: rock.bricks.block + }) + .id(`tfg:shaped/${rockId}_pillar`); + } } - if (rock.bricks != null && rock.pillar2 != null) { - event.shaped(`2x ${rock.pillar2}`, [ - 'AA' - ], { - A: rock.bricks.block - }) - .id(`tfg:shaped/${rockId}_pillar2`); - - event.stonecutting(rock.pillar2, rock.bricks.block) - .id(`tfg:stonecutting/${rockId}_pillar2`); + if (rock.pillar2 != null) { + if (rock.bricks != null) { + event.shaped(`2x ${rock.pillar2}`, [ + 'AA' + ], { + A: rock.bricks.block + }) + .id(`tfg:shaped/${rockId}_pillar2`); + } } // Chiseling @@ -414,20 +412,21 @@ function registerTFGRockRecipes(event) { // Stonecutting if (rock.stonecutterTag != null) { - // The create tags are already filled out, so just add the polished/chiseled blocks to it - if (rock.stonecutterTag.startsWith('create')) { - if (rock.polished != null) - event.stonecutting(rock.polished.block, `#${rock.stonecutterTag}`); - if (rock.chiseled != null) - event.stonecutting(rock.chiseled.block, `#${rock.stonecutterTag}`); - } - else { - let tag_array = Ingredient.of(`#${rock.stonecutterTag}`).itemIds.toArray().map(String); - tag_array.forEach(item => { - event.stonecutting(item, Ingredient.of(`#${rock.stonecutterTag}`).subtract(item)) - .id(`tfg:stonecutter/${linuxUnfucker(item)}`) - }) - } + // Pull everything out of the tag + let tag_array = Ingredient.of(`#${rock.stonecutterTag}`).itemIds.toArray().map(String); + let tag_array_half = Ingredient.of(`#${rock.stonecutterTag}_half`).itemIds.toArray().map(String); + // Remove any duplicates + tag_array = tag_array.filter((item, index) => tag_array.indexOf(item) === index); + tag_array.forEach(item => { + event.stonecutting(item, Ingredient.of(`#${rock.stonecutterTag}`).subtract(item)) + .id(`tfg:stonecutter/${linuxUnfucker(item)}`) + }) + tag_array_half.forEach(item => { + event.stonecutting(`2x ${item}`, Ingredient.of(`#${rock.stonecutterTag}`).subtract(item)) + .id(`tfg:stonecutter/${linuxUnfucker(item)}_half`) + event.stonecutting(item, Ingredient.of(`#${rock.stonecutterTag}_half`).subtract(item)) + .id(`tfg:stonecutter/${linuxUnfucker(item)}_slab_to_slab`) + }) } // Supports diff --git a/kubejs/server_scripts/tfg/natural_blocks/tags.stones.js b/kubejs/server_scripts/tfg/natural_blocks/tags.stones.js index 1a3657b03..e13e05f25 100644 --- a/kubejs/server_scripts/tfg/natural_blocks/tags.stones.js +++ b/kubejs/server_scripts/tfg/natural_blocks/tags.stones.js @@ -19,6 +19,21 @@ function registerTFGStoneItemTags(event) { } } + function addToStonecutterTag(tag, entry) { + if (tag != null) { + event.add(tag, entry.block); + if (entry.stair != null) { + event.add(tag, entry.stair); + } + if (entry.wall != null) { + event.add(tag, entry.wall); + } + if (entry.slab != null) { + event.add(`${tag}_half`, entry.slab); + } + } + } + const SHAPES = ['stair', 'slab', 'wall']; for (let [rockId, rock] of Object.entries(global.BIG_ROCK_TABLE)) { @@ -34,8 +49,8 @@ function registerTFGStoneItemTags(event) { } addToTfcTag(rock.raw.block); addToMaterialTag(material, rock.raw.block); - if (rock.brick == null && rock.stonecutterTag != null) { - event.add(rock.stonecutterTag, rock.raw.block); + if (rock.brick == null) { + addToStonecutterTag(rock.stonecutterTag, rock.raw); } SHAPES.forEach(shape => { @@ -89,9 +104,7 @@ function registerTFGStoneItemTags(event) { event.add('tfc:rock/bricks', rock.bricks.block); addToTfcTag(rock.bricks.block); addToMaterialTag(material, rock.bricks.block); - if (rock.stonecutterTag != null) { - event.add(rock.stonecutterTag, rock.bricks.block); - } + addToStonecutterTag(rock.stonecutterTag, rock.bricks); SHAPES.forEach(shape => { if (rock.bricks[shape] != null) { @@ -150,9 +163,7 @@ function registerTFGStoneItemTags(event) { event.add('forge:smooth_stone', rock.polished.block); addToTfcTag(rock.polished.block); addToMaterialTag(material, rock.polished.block); - if (rock.stonecutterTag != null) { - event.add(rock.stonecutterTag, rock.polished.block); - } + addToStonecutterTag(rock.stonecutterTag, rock.polished); SHAPES.forEach(shape => { if (rock.polished[shape] != null) { @@ -173,9 +184,7 @@ function registerTFGStoneItemTags(event) { event.add('tfc:rock/chiseled_bricks', rock.chiseled.block); addToTfcTag(rock.chiseled.block); addToMaterialTag(material, rock.chiseled.block); - if (rock.stonecutterTag != null) { - event.add(rock.stonecutterTag, rock.chiseled.block); - } + addToStonecutterTag(rock.stonecutterTag, rock.chiseled); } if (rock.gravel != null) { @@ -237,17 +246,12 @@ function registerTFGStoneItemTags(event) { event.add('tfc:rock/chiseled_bricks', blockForms.block); addToTfcTag(blockForms.block); addToMaterialTag(material, blockForms.block); - if (rock.stonecutterTag != null) { - event.add(rock.stonecutterTag, blockForms.block); - } + addToStonecutterTag(rock.stonecutterTag, blockForms); SHAPES.forEach(shape => { if (blockForms[shape] != null) { addToTfcTag(blockForms[shape]); addToMaterialTag(material, blockForms[shape]); - if (rock.stonecutterTag != null) { - event.add(rock.stonecutterTag, blockForms[shape]); - } } }) })