From ed4b20b4c004e62c6d5f3c9389e2c4f7fd72dbb6 Mon Sep 17 00:00:00 2001 From: SpeeeDCraft <52341158+SpeeeDCraft@users.noreply.github.com> Date: Tue, 14 Nov 2023 22:59:01 +0700 Subject: [PATCH] 123 --- kubejs/server_scripts/tfc/constants.js | 235 +++++++++--------- kubejs/server_scripts/tfc/data.js | 10 +- kubejs/server_scripts/tfc/recipes.js | 35 ++- ... => almostunified-forge-1.20.1-0.7.0.jard} | Bin 4 files changed, 137 insertions(+), 143 deletions(-) rename mods/{almostunified-forge-1.20.1-0.7.0.jar => almostunified-forge-1.20.1-0.7.0.jard} (100%) diff --git a/kubejs/server_scripts/tfc/constants.js b/kubejs/server_scripts/tfc/constants.js index 338f89137..ed7cbb132 100644 --- a/kubejs/server_scripts/tfc/constants.js +++ b/kubejs/server_scripts/tfc/constants.js @@ -83,9 +83,6 @@ const toolProperty = [ const utilityProperty = [ "anvil", "bars", - "block", - "block_stairs", - "block_slab", "chain", "lamp", "trapdoor", @@ -94,145 +91,145 @@ const utilityProperty = [ const ItemHeats = { "nugget": { heat_capacity: 0.124, metal_amount: { - "bismuth": { metalName: "bismuth", amount: 16 }, - "cassiterite": { metalName: "tin", amount: 16 }, - "copper": { metalName: "copper", amount: 16 }, - "garnierite": { metalName: "nickel", amount: 14 }, - "gold": { metalName: "gold", amount: 16 }, - "hematite": { metalName: "iron", amount: 13 }, - "iron": { metalName: "iron", amount: 16 }, - "yellow_limonite": { metalName: "iron", amount: 14 }, - "magnetite": { metalName: "iron", amount: 14 }, - "malachite": { metalName: "copper", amount: 13 }, - "nickel": { metalName: "nickel", amount: 16 }, - "pyrite": { metalName: "iron", amount: 12 }, - "silver": { metalName: "silver", amount: 16 }, - "sphalerite": { metalName: "tin", amount: 16 }, - "tetrahedrite": { metalName: "copper", amount: 14 }, - "tin": { metalName: "tin", amount: 16 }, + "bismuth": 16, + "cassiterite": 16, + "copper": 16, + "garnierite": 14, + "gold": 16, + "hematite": 13, + "iron": 16, + "yellow_limonite": 14, + "magnetite": 14, + "malachite": 13, + "nickel": 16, + "pyrite": 12, + "silver": 16, + "sphalerite": 16, + "tetrahedrite": 14, + "tin": 16, }, input: (name) => { return { tag: `forge:nuggets/${name}` } }, output: (name) => { return { item: `gtceu:${name}_nugget` } } }, "dust": { heat_capacity: 1.429, metal_amount: { - "bismuth": { metalName: "bismuth", amount: 144 }, - "cassiterite": { metalName: "tin", amount: 144 }, - "copper": { metalName: "copper", amount: 144 }, - "garnierite": { metalName: "nickel", amount: 126 }, - "gold": { metalName: "gold", amount: 144 }, - "hematite": { metalName: "iron", amount: 117 }, - "iron": { metalName: "iron", amount: 144 }, - "yellow_limonite": { metalName: "iron", amount: 126 }, - "magnetite": { metalName: "iron", amount: 126 }, - "malachite": { metalName: "copper", amount: 117 }, - "nickel": { metalName: "nickel", amount: 144 }, - "pyrite": { metalName: "iron", amount: 123 }, - "silver": { metalName: "silver", amount: 144 }, - "sphalerite": { metalName: "tin", amount: 144 }, - "tetrahedrite": { metalName: "copper", amount: 126 }, - "tin": { metalName: "tin", amount: 144 }, + "bismuth": 144, + "cassiterite": 144, + "copper": 144, + "garnierite": 126, + "gold": 144, + "hematite": 117, + "iron": 144, + "yellow_limonite": 126, + "magnetite": 126, + "malachite": 117, + "nickel": 144, + "pyrite": 123, + "silver": 144, + "sphalerite": 144, + "tetrahedrite": 126, + "tin": 144, }, input: (name) => { return { tag: `forge:dusts/${name}` } }, output: (name) => { return { item: `gtceu:${name}_dust` } } }, "dust_small": { heat_capacity: 0.714, metal_amount: { - "bismuth": { metalName: "bismuth", amount: 36 }, - "cassiterite": { metalName: "tin", amount: 36 }, - "copper": { metalName: "copper", amount: 36 }, - "garnierite": { metalName: "nickel", amount: 31 }, - "gold": { metalName: "gold", amount: 36 }, - "hematite": { metalName: "iron", amount: 29 }, - "iron": { metalName: "iron", amount: 36 }, - "yellow_limonite": { metalName: "iron", amount: 31 }, - "magnetite": { metalName: "iron", amount: 31 }, - "malachite": { metalName: "copper", amount: 29 }, - "nickel": { metalName: "nickel", amount: 36 }, - "pyrite": { metalName: "iron", amount: 27 }, - "silver": { metalName: "silver", amount: 36 }, - "sphalerite": { metalName: "tin", amount: 36 }, - "tetrahedrite": { metalName: "copper", amount: 31 }, - "tin": { metalName: "tin", amount: 36 }, + "bismuth": 36, + "cassiterite": 36, + "copper": 36, + "garnierite": 31, + "gold": 36, + "hematite": 29, + "iron": 36, + "yellow_limonite": 31, + "magnetite": 31, + "malachite": 29, + "nickel": 36, + "pyrite": 27, + "silver": 36, + "sphalerite": 36, + "tetrahedrite": 31, + "tin": 36, }, input: (name) => { return { tag: `forge:dusts/small/${name}` } }, output: (name) => { return { item: `gtceu:${name}_dust_small` } } }, "dust_tiny": { heat_capacity: 0.357, metal_amount: { - "bismuth": { metalName: "bismuth", amount: 16 }, - "cassiterite": { metalName: "tin", amount: 16 }, - "copper": { metalName: "copper", amount: 16 }, - "garnierite": { metalName: "nickel", amount: 14 }, - "gold": { metalName: "gold", amount: 16 }, - "hematite": { metalName: "iron", amount: 13 }, - "iron": { metalName: "iron", amount: 16 }, - "yellow_limonite": { metalName: "iron", amount: 14 }, - "magnetite": { metalName: "iron", amount: 14 }, - "malachite": { metalName: "copper", amount: 13 }, - "nickel": { metalName: "nickel", amount: 16 }, - "pyrite": { metalName: "iron", amount: 12 }, - "silver": { metalName: "silver", amount: 16 }, - "sphalerite": { metalName: "tin", amount: 16 }, - "tetrahedrite": { metalName: "copper", amount: 14 }, - "tin": { metalName: "tin", amount: 16 }, + "bismuth": 16, + "cassiterite": 16, + "copper": 16, + "garnierite": 14, + "gold": 16, + "hematite": 13, + "iron": 16, + "yellow_limonite": 14, + "magnetite": 14, + "malachite": 13, + "nickel": 16, + "pyrite": 12, + "silver": 16, + "sphalerite": 16, + "tetrahedrite": 14, + "tin": 16, }, input: (name) => { return { tag: `forge:dusts/tiny/${name}` } }, output: (name) => { return { item: `gtceu:${name}_dust_tiny` } } }, "poor_raw": { heat_capacity: 1.429, metal_amount: { - "bismuth": { metalName: "bismuth", amount: 24 }, - "cassiterite": { metalName: "tin", amount: 24 }, - "copper": { metalName: "copper", amount: 24 }, - "garnierite": { metalName: "nickel", amount: 21 }, - "gold": { metalName: "gold", amount: 24 }, - "hematite": { metalName: "iron", amount: 18 }, - "iron": { metalName: "iron", amount: 24 }, - "yellow_limonite": { metalName: "iron", amount: 21 }, - "magnetite": { metalName: "iron", amount: 21 }, - "malachite": { metalName: "copper", amount: 18 }, - "nickel": { metalName: "nickel", amount: 24 }, - "pyrite": { metalName: "iron", amount: 18 }, - "silver": { metalName: "silver", amount: 24 }, - "sphalerite": { metalName: "tin", amount: 24 }, - "tetrahedrite": { metalName: "copper", amount: 21 }, - "tin": { metalName: "tin", amount: 24 }, + "bismuth": 24, + "cassiterite": 24, + "copper": 24, + "garnierite": 21, + "gold": 24, + "hematite": 18, + "iron": 24, + "yellow_limonite": 21, + "magnetite": 21, + "malachite": 18, + "nickel": 24, + "pyrite": 18, + "silver": 24, + "sphalerite": 24, + "tetrahedrite": 21, + "tin": 24, }, input: (name) => { return { tag: `forge:poor_raw_materials/${name}` } }, output: (name) => { return { item: `gtceu:poor_raw_${name}` } } }, "normal_raw": { heat_capacity: 1.429, metal_amount: { - "bismuth": { metalName: "bismuth", amount: 36 }, - "cassiterite": { metalName: "tin", amount: 36 }, - "copper": { metalName: "copper", amount: 36 }, - "garnierite": { metalName: "nickel", amount: 31 }, - "gold": { metalName: "gold", amount: 36 }, - "hematite": { metalName: "iron", amount: 29 }, - "iron": { metalName: "iron", amount: 36 }, - "yellow_limonite": { metalName: "iron", amount: 31 }, - "magnetite": { metalName: "iron", amount: 31 }, - "malachite": { metalName: "copper", amount: 29 }, - "nickel": { metalName: "nickel", amount: 36 }, - "pyrite": { metalName: "iron", amount: 27 }, - "silver": { metalName: "silver", amount: 36 }, - "sphalerite": { metalName: "tin", amount: 36 }, - "tetrahedrite": { metalName: "copper", amount: 31 }, - "tin": { metalName: "tin", amount: 36 }, + "bismuth": 36, + "cassiterite": 36, + "copper": 36, + "garnierite": 31, + "gold": 36, + "hematite": 29, + "iron": 36, + "yellow_limonite": 31, + "magnetite": 31, + "malachite": 29, + "nickel": 36, + "pyrite": 27, + "silver": 36, + "sphalerite": 36, + "tetrahedrite": 31, + "tin": 36, }, input: (name) => { return { tag: `forge:raw_materials/${name}` } }, output: (name) => { return { item: `gtceu:raw_${name}` } } }, "rich_raw": { heat_capacity: 1.429, metal_amount: { - "bismuth": { metalName: "bismuth", amount: 48 }, - "cassiterite": { metalName: "tin", amount: 48 }, - "copper": { metalName: "copper", amount: 48 }, - "garnierite": { metalName: "nickel", amount: 42 }, - "gold": { metalName: "gold", amount: 48 }, - "hematite": { metalName: "iron", amount: 39 }, - "iron": { metalName: "iron", amount: 48 }, - "yellow_limonite": { metalName: "iron", amount: 42 }, - "magnetite": { metalName: "iron", amount: 42 }, - "malachite": { metalName: "copper", amount: 39 }, - "nickel": { metalName: "nickel", amount: 48 }, - "pyrite": { metalName: "iron", amount: 36 }, - "silver": { metalName: "silver", amount: 48 }, - "sphalerite": { metalName: "tin", amount: 48 }, - "tetrahedrite": { metalName: "copper", amount: 42 }, - "tin": { metalName: "tin", amount: 48 }, + "bismuth": 48, + "cassiterite": 48, + "copper": 48, + "garnierite": 42, + "gold": 48, + "hematite": 39, + "iron": 48, + "yellow_limonite": 42, + "magnetite": 42, + "malachite": 39, + "nickel": 48, + "pyrite": 36, + "silver": 48, + "sphalerite": 48, + "tetrahedrite": 42, + "tin": 48, }, input: (name) => { return { tag: `forge:rich_raw_materials/${name}` } }, output: (name) => { return { item: `gtceu:rich_raw_${name}` } } }, - "block_slab": { heat_capacity: null }, - "block_stairs": { heat_capacity: null }, + "block_slab": { heat_capacity: null }, // can't melt + "block_stairs": { heat_capacity: null }, // can't melt "block": { heat_capacity: 2.857, metal_amount: 1296, input: (name) => { return { tag: `forge:storage_blocks/${name}` } }, @@ -339,7 +336,7 @@ const ItemHeats = { "scythe": { heat_capacity: 2.857, metal_amount: 144, input: (name) => { return { item: `gtceu:${name}_scythe` } }, output: (name) => { return { item: `gtceu:${name}_scythe` } } }, - "chisel_head": { heat_capacity: 2.857, + "chisel_head": { heat_capacity: 2.857, metal_amount: 144, input: (name) => { return { item: `tfc:metal/chisel_head/${name}` } }, output: (name) => { return { item: `tfc:metal/chisel_head/${name}` } }, }, "chisel": { heat_capacity: 2.857, metal_amount: 144, @@ -428,7 +425,7 @@ const Metals = { "cassiterite": { forging_temp: 138, welding_temp: 184, melt_temp: 230, fluidName: "gtceu:zinc", props: [].concat(oreProperty, dustProperty) }, "garnierite": { forging_temp: 138, welding_temp: 184, melt_temp: 1453, fluidName: "gtceu:nickel", props: [].concat(oreProperty, dustProperty) }, "hematite": { forging_temp: 138, welding_temp: 184, melt_temp: 1535, fluidName: "gtceu:iron", props: [].concat(oreProperty, dustProperty) }, - "limonite": { forging_temp: 138, welding_temp: 184, melt_temp: 1535, fluidName: "gtceu:iron", customName: "yellow_limonite", props: [].concat(oreProperty, dustProperty) }, + "yellow_limonite": { forging_temp: 138, welding_temp: 184, melt_temp: 1535, fluidName: "gtceu:iron", props: [].concat(oreProperty, dustProperty) }, "magnetite": { forging_temp: 138, welding_temp: 184, melt_temp: 1535, fluidName: "gtceu:iron", props: [].concat(oreProperty, dustProperty) }, "malachite": { forging_temp: 138, welding_temp: 184, melt_temp: 1080, fluidName: "gtceu:copper", props: [].concat(oreProperty, dustProperty) }, "pyrite": { forging_temp: 138, welding_temp: 184, melt_temp: 1535, fluidName: "gtceu:iron", props: [].concat(oreProperty, dustProperty) }, diff --git a/kubejs/server_scripts/tfc/data.js b/kubejs/server_scripts/tfc/data.js index 22352b8c6..42b321fc9 100644 --- a/kubejs/server_scripts/tfc/data.js +++ b/kubejs/server_scripts/tfc/data.js @@ -1,17 +1,20 @@ // priority: 0 +const registerTFCData = (event) => { + registerTFCItemHeats(event) +} + const registerTFCItemHeats = (event) => { for (const [tfcMetalName, metalSpecifications] of Object.entries(Metals)) { metalSpecifications.props.forEach(propertyName => { let itemType = ItemHeats[propertyName] let path = `tfc:tfc/item_heats/metal/${tfcMetalName}_${propertyName}` - let metalName = (metalSpecifications.customName != undefined) ? metalSpecifications.customName : tfcMetalName if (itemType.heat_capacity == null) { event.addJson(path, emptyJson) } else { - let ingredient = itemType.input(metalName) + let ingredient = itemType.input(tfcMetalName) let json = { ingredient: ingredient, @@ -25,6 +28,3 @@ const registerTFCItemHeats = (event) => { } } -const registerTFCData = (event) => { - registerTFCItemHeats(event) -} \ No newline at end of file diff --git a/kubejs/server_scripts/tfc/recipes.js b/kubejs/server_scripts/tfc/recipes.js index 86d0636cb..12b243365 100644 --- a/kubejs/server_scripts/tfc/recipes.js +++ b/kubejs/server_scripts/tfc/recipes.js @@ -8,7 +8,7 @@ const registerTFCRecipes = (event) => { event.remove({ id: /tfc:heating\/ore.*/ }) registerTFCHeatingRecipes(event) - registerTFCCastingRecipes(event) + //registerTFCCastingRecipes(event) event.remove({ id: 'tfc:crafting/vanilla/lapis_block' }) @@ -352,49 +352,46 @@ const registerTFCHeatingRecipes = (event) => { metalSpecifications.props.forEach(propertyName => { let jsonRecipePath = `tfc:recipes/metal/${tfcMetalName}_${propertyName}` let itemTypeSpecifications = ItemHeats[propertyName] - let finalMetalName = (metalSpecifications.customName != undefined) ? metalSpecifications.customName : tfcMetalName if (itemTypeSpecifications.heat_capacity != null) { - let ingredient = itemTypeSpecifications.input(finalMetalName) - - let json + let ingredientInput = itemTypeSpecifications.input(tfcMetalName) if (typeof(itemTypeSpecifications.metal_amount) == "object") { - if (itemTypeSpecifications.metal_amount[finalMetalName] != undefined) + if (itemTypeSpecifications.metal_amount[tfcMetalName] != undefined) { - let customMetalName = itemTypeSpecifications.metal_amount[finalMetalName].metalName - let metalAmount = itemTypeSpecifications.metal_amount[finalMetalName].amount - - json = { + let json = { id: jsonRecipePath, type: "tfc:heating", - ingredient: ingredient, + ingredient: ingredientInput, result_fluid: { - fluid: `gtceu:${customMetalName}`, - amount: metalAmount + fluid: metalSpecifications.fluidName, + amount: itemTypeSpecifications.metal_amount[tfcMetalName] }, temperature: metalSpecifications.melt_temp, use_durability: false } + + //console.log(json) + event.custom(json) } } else { - json = { + let json = { id: jsonRecipePath, type: "tfc:heating", - ingredient: ingredient, + ingredient: ingredientInput, result_fluid: { - fluid: `gtceu:${finalMetalName}`, + fluid: metalSpecifications.fluidName, amount: itemTypeSpecifications.metal_amount }, temperature: metalSpecifications.melt_temp, use_durability: false } + + //console.log(json) + event.custom(json) } - - console.log(json) - if (json != undefined) event.custom(json) } }) diff --git a/mods/almostunified-forge-1.20.1-0.7.0.jar b/mods/almostunified-forge-1.20.1-0.7.0.jard similarity index 100% rename from mods/almostunified-forge-1.20.1-0.7.0.jar rename to mods/almostunified-forge-1.20.1-0.7.0.jard