ServerEvents.recipes((event) => {
const MATERIAL_REPLACEMENTS = {
"ars_nouveau:archwood": "ars_nouveau:archwood_planks",
"ars_additions:sourcestone": "ars_nouveau:sourcestone",
"ars_additions:polished_sourcestone": "ars_nouveau:smooth_sourcestone",
const removeRecipes = (id) => {
{ type: "minecraft:crafting_shaped", output: id },
{ type: "minecraft:stonecutting", output: id },
* @param {string} material
const slab = (material, id) => {
if (Ingredient.of(material).itemIds.length === 0) {
event.shaped(Item.of(id, 6), ["AAA"], { A: material });
if (material.includes("stone")) {
event.stonecutting(Item.of(id, 2), material);
* @param {string} material
const stair = (material, id) => {
if (Ingredient.of(material).itemIds.length === 0) {
event.shaped(Item.of(id, 4), ["A ", "AA ", "AAA"], { A: material });
if (material.includes("stone")) {
event.stonecutting(Item.of(id, 1), material);
* @param {string} material
const wall = (material, id) => {
if (Ingredient.of(material).itemIds.length === 0) {
event.shaped(Item.of(id, 6), ["AAA", "AAA"], { A: material });
event.stonecutting(Item.of(id, 1), material);
* @param {(material: string, id: string) => void} f
const go = (f, mod, re) => {
if (Platform.isLoaded(mod)) {
Ingredient.of(re).itemIds.forEach((id) => {
let material = id.match(re)[1];
let replacement = MATERIAL_REPLACEMENTS[material];
material = replacement != null ? replacement : material;
go(slab, "ars_nouveau", /^(ars_nouveau:.*)_slab$/);
go(stair, "ars_nouveau", /^(ars_nouveau:.*)_stairs$/);
go(wall, "ars_additions", /^(ars_additions:.*)_wall$/);