From 3654494ead8121c990312119ba654d51502a4364 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Thu, 18 Feb 2021 17:43:21 +0100 Subject: [PATCH] fix a bunch of recipe and tag bugs --- src/kubejs/server/src/Main.hx | 2 + src/kubejs/server/src/Recipes.hx | 90 +++++++++++++++++++++++++------- src/kubejs/server/src/Tags.hx | 36 +++++++++++++ 3 files changed, 108 insertions(+), 20 deletions(-) create mode 100644 src/kubejs/server/src/Tags.hx diff --git a/src/kubejs/server/src/Main.hx b/src/kubejs/server/src/Main.hx index d80d341..8868f16 100644 --- a/src/kubejs/server/src/Main.hx +++ b/src/kubejs/server/src/Main.hx @@ -13,5 +13,7 @@ class Main { Settings.logErroringRecipes = true; Events.onEvent(EventType.RecipesEventType, Recipes.onEvent); + Events.onEvent(EventType.ItemTagsEventType, Tags.onItemTagsEvent); + Events.onEvent(EventType.BlockTagsEventType, Tags.onBlockTagsEvent); } } diff --git a/src/kubejs/server/src/Recipes.hx b/src/kubejs/server/src/Recipes.hx index 1931ae3..7ed08ed 100644 --- a/src/kubejs/server/src/Recipes.hx +++ b/src/kubejs/server/src/Recipes.hx @@ -39,6 +39,7 @@ class Recipes { shapedRecipes(event); shapelessRecipes(event); customRecipes(event); + replaceInputs(event); } static function shapedRecipes(event:RecipesEvent) { @@ -146,26 +147,6 @@ class Recipes { E: "minecraft:ender_eye", C: "mekanism:teleportation_core" }); - - // Steel Fix - event.shaped("assemblylinemachines:simple_grinder", ["sss", "rdr", "iii"], { - s: "#forge:ingots/steel", - i: "#forge:ingots/iron", - r: "#forge:dusts/redstone", - d: "assemblylinemachines:hand_grinder" - }); - - event.shaped("assemblylinemachines:steel_blade_piece", [" y ", "yxy"], { - x: "#forge:ingots/steel", - y: "#forge:nuggets/steel" - }); - - event.shaped("assemblylinemachines:steel_fluid_tank", ["rsr", "gwg", "rsr"], { - r: "assemblylinemachines:steel_rod", - g: "#forge:glass_panes", - s: "#forge:ingots/steel", - w: "assemblylinemachines:wooden_fluid_tank" - }); } static function shapelessRecipes(event:RecipesEvent) { @@ -198,5 +179,74 @@ class Recipes { } ] }); + + // Resourceful bees honey to honey block in blast chiller + event.custom({ + type: "thermal:chiller", + ingredient: { + fluid: "resourcefulbees:honey", + amount: 1000 + }, + result: [ + { + item: "minecraft:honey_block" + } + ] + }); + + // Ore processing fixes + var enrichmentChamberOreRecipes = [ + ["forge:ores/nickel", "thermal:nickel_dust"], + ["forge:ores/silver", "thermal:silver_dust"], + ["forge:ores/aluminum", "silents_mechanisms:aluminum_dust"], + ["forge:ores/yellorite", "bigreactors:yellorium_dust"] + ]; + + var bothOreRecipes = [ + ["forge:ores/bismuth", "silents_mechanisms:bismuth_dust"] + ]; + + for (r in enrichmentChamberOreRecipes.concat(bothOreRecipes)) { + event.custom({ + type: "mekanism:enriching", + input: { + ingredient: { + tag: r[0] + } + }, + output: { + item: r[1], + count: 2 + } + }); + } + + for (r in bothOreRecipes) { + event.custom({ + type: "thermal:pulverizer", + ingredient: { + tag: r[0] + }, + result: [ + { + item: r[1], + chance: 2.0 + }, + { + item: "minecraft:gravel", + chance: 0.2 + } + ] + }); + } + } + + static function replaceInputs(event:RecipesEvent) { + // ALM Fixes + var almFixesFilter = {mod: "assemblylinemachines"}; + event.replaceInput(almFixesFilter, "assemblylinemachines:steel_ingot", "#forge:ingots/steel"); + event.replaceInput(almFixesFilter, "assemblylinemachines:steel_plate", "#forge:plates/steel"); + event.replaceInput(almFixesFilter, "assemblylinemachines:steel_rod", "#forge:rods/steel"); + event.replaceInput(almFixesFilter, "assemblylinemachines:plastic_sheet", "#forge:plastic"); } } diff --git a/src/kubejs/server/src/Tags.hx b/src/kubejs/server/src/Tags.hx new file mode 100644 index 0000000..23849f0 --- /dev/null +++ b/src/kubejs/server/src/Tags.hx @@ -0,0 +1,36 @@ +package; + +import kubejs.events.server.TagsEvent; + +class Tags { + public static function onItemTagsEvent(event:TagsEvent) { + itemAndBlockTags(event); + itemTags(event); + } + + public static function onBlockTagsEvent(event:TagsEvent) { + itemAndBlockTags(event); + } + + static function itemAndBlockTags(event:TagsEvent) { + // Fix ore tags + event.add("forge:ores/copper", ["electrodynamics:orecopper"]); + event.add("forge:ores/tin", ["electrodynamics:oretin"]); + event.add("forge:ores/silver", ["electrodynamics:oresilver"]); + event.add("forge:ores/lead", ["electrodynamics:orelead"]); + event.add("forge:ores/sulfur", ["electrodynamics:oresulfur"]); + + event.add("forge:ores/yellorite", ["bigreactors:yellorite_ore"]); + + // Trapdoor tags + var trapdoors = ["ars_nouveau:archwood_trapdoor", "rats:pirat_trapdoor"]; + event.add("minecraft:trapdoors", trapdoors); + event.add("minecraft:wooden_trapdoors", trapdoors); + } + + static function itemTags(event:TagsEvent) { + event.add("forge:plates/iron", ["assemblylinemachines:iron_plate"]); + event.add("forge:plates/steel", ["assemblylinemachines:steel_plate"]); + event.add("forge:plastic", ["assemblylinemachines:plastic_sheet"]); + } +}