From 97c66be49f4d355564843772787ab17f882147d2 Mon Sep 17 00:00:00 2001 From: Jonas <17405009+J0B10@users.noreply.github.com> Date: Fri, 11 Feb 2022 16:45:30 +0100 Subject: [PATCH 1/4] Update .gitignore --- .gitignore | 9 +-------- resources/pack.mcmeta | 1 + 2 files changed, 2 insertions(+), 8 deletions(-) create mode 100644 resources/pack.mcmeta diff --git a/.gitignore b/.gitignore index 0686bca..271cfd7 100644 --- a/.gitignore +++ b/.gitignore @@ -17,14 +17,7 @@ # except custom resources !resources -!resources/contenttweaker -!resources/contenttweaker/**/** -!resources/waystones -!resources/waystones/** -!resources/patchouli -!resources/patchouli/** -!resources/minecraft -!resources/minecraft/** +!resources/** # except changed config files (add manually) !config diff --git a/resources/pack.mcmeta b/resources/pack.mcmeta new file mode 100644 index 0000000..0a7d879 --- /dev/null +++ b/resources/pack.mcmeta @@ -0,0 +1 @@ +{"pack":{"pack_format":3,"description":"B.A.S.E External Resources"}} \ No newline at end of file From 668d56faa2f88f1a4a8978ffbaed0969f74847e6 Mon Sep 17 00:00:00 2001 From: Jonas <17405009+J0B10@users.noreply.github.com> Date: Fri, 11 Feb 2022 16:46:28 +0100 Subject: [PATCH 2/4] Add botania materials to tc --- resources/base/textures/items/gear.png | Bin 0 -> 367 bytes resources/base/textures/items/plate.png | Bin 0 -> 399 bytes .../materials/botanic_alloy_block.json | 16 +++ .../materials/manasteel_molten.json | 12 ++ resources/contenttweaker/lang/en_us.lang | 5 + .../models/item/botanic_alloy_gear.json | 6 + .../models/item/botanic_alloy_ingot.json | 6 + .../models/item/botanic_alloy_nugget.json | 6 + .../models/item/botanic_alloy_plate.json | 6 + .../models/item/elementium_gear.json | 6 + .../models/item/elementium_plate.json | 6 + .../models/item/gaia_spirit_gear.json | 6 + .../models/item/gaia_spirit_plate.json | 6 + .../models/item/manasteel_gear.json | 6 + .../models/item/manasteel_plate.json | 6 + .../models/item/terrasteel_gear.json | 6 + .../models/item/terrasteel_plate.json | 6 + .../textures/items/botanic_alloy_nugget.png | Bin 0 -> 640 bytes scripts/_new.zs | 106 +++++++++++++++++- scripts/_oredict.zs | 4 + 20 files changed, 210 insertions(+), 5 deletions(-) create mode 100644 resources/base/textures/items/gear.png create mode 100644 resources/base/textures/items/plate.png create mode 100644 resources/contenttweaker/blockstates/materials/botanic_alloy_block.json create mode 100644 resources/contenttweaker/blockstates/materials/manasteel_molten.json create mode 100644 resources/contenttweaker/models/item/botanic_alloy_gear.json create mode 100644 resources/contenttweaker/models/item/botanic_alloy_ingot.json create mode 100644 resources/contenttweaker/models/item/botanic_alloy_nugget.json create mode 100644 resources/contenttweaker/models/item/botanic_alloy_plate.json create mode 100644 resources/contenttweaker/models/item/elementium_gear.json create mode 100644 resources/contenttweaker/models/item/elementium_plate.json create mode 100644 resources/contenttweaker/models/item/gaia_spirit_gear.json create mode 100644 resources/contenttweaker/models/item/gaia_spirit_plate.json create mode 100644 resources/contenttweaker/models/item/manasteel_gear.json create mode 100644 resources/contenttweaker/models/item/manasteel_plate.json create mode 100644 resources/contenttweaker/models/item/terrasteel_gear.json create mode 100644 resources/contenttweaker/models/item/terrasteel_plate.json create mode 100644 resources/contenttweaker/textures/items/botanic_alloy_nugget.png diff --git a/resources/base/textures/items/gear.png b/resources/base/textures/items/gear.png new file mode 100644 index 0000000000000000000000000000000000000000..2014407516750a59e1e80fd6f356487d76f3b575 GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p?vK$y{C-$S4zBa5etV~BUbHJ^4X7x*bj(zVx*IqBZV#1pm`Awzh_9~~2ZMnfBu6LLf3Rp@vsP9_mohVTh9}p^fwbVEF zcF?@%uO4*?pHMiYx2!2gqD`(L=c%ZUfv>RtQRlwL9}Wo`9Qkb1^*EwAmC@mw1y8e| z=mWV!5}&xl95#9E(DBY&_xe`|YXOJ&vdmT7r3UAXdmo>0Jji-tMo$;B?V8T+)W{vH z7$&(Mx^XIwCG^CmZO3nyGl(-qh$;Qz*!{jbPP?lq{^{-M9eWis--uc$bMdhXOiGQE q?`%3;&!{AHNiwkDm+@b=MeP3U8+c+XE_VO}k-^i|&t;ucLK6Tlf0um# literal 0 HcmV?d00001 diff --git a/resources/contenttweaker/blockstates/materials/botanic_alloy_block.json b/resources/contenttweaker/blockstates/materials/botanic_alloy_block.json new file mode 100644 index 0000000..123f573 --- /dev/null +++ b/resources/contenttweaker/blockstates/materials/botanic_alloy_block.json @@ -0,0 +1,16 @@ +{ + "forge_marker": 1, + "defaults": { + "textures": { + "texture": "base:blocks/block", + "particle": "base:blocks/block" + }, + "model": "base:storage", + "uvlock": true, + "transform": "forge:default-block" + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} \ No newline at end of file diff --git a/resources/contenttweaker/blockstates/materials/manasteel_molten.json b/resources/contenttweaker/blockstates/materials/manasteel_molten.json new file mode 100644 index 0000000..5e90972 --- /dev/null +++ b/resources/contenttweaker/blockstates/materials/manasteel_molten.json @@ -0,0 +1,12 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "forge:fluid", + "custom": { + "fluid": "manasteel" + } + }, + "variants": { + "normal": [{}] + } +} \ No newline at end of file diff --git a/resources/contenttweaker/lang/en_us.lang b/resources/contenttweaker/lang/en_us.lang index 6c8e195..3d71c35 100644 --- a/resources/contenttweaker/lang/en_us.lang +++ b/resources/contenttweaker/lang/en_us.lang @@ -6,3 +6,8 @@ tile.contenttweaker.botanic_alloy_block.name=Botanic Alloy Block tile.contenttweaker.elite_table_base.name=Elite Crafting Table Base item.contenttweaker.nether_star_shard.name=Nether Star Shard item.contenttweaker.nether_star_core.name=Nether Star Core +material.manasteel.name=Manasteel +material.terrasteel.name=Terrasteel +material.elementium.name=Elementium +material.livingwood.name=Livingwood +material.manastring.name=Manastring diff --git a/resources/contenttweaker/models/item/botanic_alloy_gear.json b/resources/contenttweaker/models/item/botanic_alloy_gear.json new file mode 100644 index 0000000..7d41e6a --- /dev/null +++ b/resources/contenttweaker/models/item/botanic_alloy_gear.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/gear" + } +} diff --git a/resources/contenttweaker/models/item/botanic_alloy_ingot.json b/resources/contenttweaker/models/item/botanic_alloy_ingot.json new file mode 100644 index 0000000..7caa7e7 --- /dev/null +++ b/resources/contenttweaker/models/item/botanic_alloy_ingot.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/ingot" + } +} diff --git a/resources/contenttweaker/models/item/botanic_alloy_nugget.json b/resources/contenttweaker/models/item/botanic_alloy_nugget.json new file mode 100644 index 0000000..06699eb --- /dev/null +++ b/resources/contenttweaker/models/item/botanic_alloy_nugget.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/nugget" + } +} diff --git a/resources/contenttweaker/models/item/botanic_alloy_plate.json b/resources/contenttweaker/models/item/botanic_alloy_plate.json new file mode 100644 index 0000000..a747d2c --- /dev/null +++ b/resources/contenttweaker/models/item/botanic_alloy_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/plate" + } +} diff --git a/resources/contenttweaker/models/item/elementium_gear.json b/resources/contenttweaker/models/item/elementium_gear.json new file mode 100644 index 0000000..7d41e6a --- /dev/null +++ b/resources/contenttweaker/models/item/elementium_gear.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/gear" + } +} diff --git a/resources/contenttweaker/models/item/elementium_plate.json b/resources/contenttweaker/models/item/elementium_plate.json new file mode 100644 index 0000000..a747d2c --- /dev/null +++ b/resources/contenttweaker/models/item/elementium_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/plate" + } +} diff --git a/resources/contenttweaker/models/item/gaia_spirit_gear.json b/resources/contenttweaker/models/item/gaia_spirit_gear.json new file mode 100644 index 0000000..7d41e6a --- /dev/null +++ b/resources/contenttweaker/models/item/gaia_spirit_gear.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/gear" + } +} diff --git a/resources/contenttweaker/models/item/gaia_spirit_plate.json b/resources/contenttweaker/models/item/gaia_spirit_plate.json new file mode 100644 index 0000000..a747d2c --- /dev/null +++ b/resources/contenttweaker/models/item/gaia_spirit_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/plate" + } +} diff --git a/resources/contenttweaker/models/item/manasteel_gear.json b/resources/contenttweaker/models/item/manasteel_gear.json new file mode 100644 index 0000000..7d41e6a --- /dev/null +++ b/resources/contenttweaker/models/item/manasteel_gear.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/gear" + } +} diff --git a/resources/contenttweaker/models/item/manasteel_plate.json b/resources/contenttweaker/models/item/manasteel_plate.json new file mode 100644 index 0000000..a747d2c --- /dev/null +++ b/resources/contenttweaker/models/item/manasteel_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/plate" + } +} diff --git a/resources/contenttweaker/models/item/terrasteel_gear.json b/resources/contenttweaker/models/item/terrasteel_gear.json new file mode 100644 index 0000000..7d41e6a --- /dev/null +++ b/resources/contenttweaker/models/item/terrasteel_gear.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/gear" + } +} diff --git a/resources/contenttweaker/models/item/terrasteel_plate.json b/resources/contenttweaker/models/item/terrasteel_plate.json new file mode 100644 index 0000000..a747d2c --- /dev/null +++ b/resources/contenttweaker/models/item/terrasteel_plate.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "base:items/plate" + } +} diff --git a/resources/contenttweaker/textures/items/botanic_alloy_nugget.png b/resources/contenttweaker/textures/items/botanic_alloy_nugget.png new file mode 100644 index 0000000000000000000000000000000000000000..91d64917e888de986a7ec5e2c61edfe1c83b3409 GIT binary patch literal 640 zcmV-`0)PF9P)4Tx04UFukvT{MK^TQU+`0#>7B&4Z9H= zOTkvK@Mw%$*jQ_8VJirN2Z)`Wm7^{I&N|Vt zur@P0r&T{wM-@%96VgpL6PX%~QF46TQl{3M9+k!aMninbHK9xs9x^jdR(Mf(U@etsc^R=7Zko%x{>D>#Yvw7Dl_QBqQk;LVJ%t2MiHCKjwKut?uc8q5Vbwc$vd~JE&=b`6)9YOgcT-XKwN)86!Mc*oD z9S6|30cV#5&DeqSO=x+@=#K77e0Av6aOCtz2LRS;-E9gq7!}yONRN%y0a*0|9N)L4);OF#aFT%E)m41=ux?1>sOxR4|$s a7#IMTN~YOY0XW(K0000; +livingwood_tc_material.addItem(); +livingwood_tc_material.addItem(, 288); +livingwood_tc_material.addItem(, 288); +livingwood_tc_material.addHeadMaterialStats(45, 2.0f, 2.0f, 1); +livingwood_tc_material.addHandleMaterialStats(1.1f, 25); +livingwood_tc_material.addExtraMaterialStats(20); +livingwood_tc_material.addBowMaterialStats(1.0f, 1.0f, 0.0f); +livingwood_tc_material.addArrowShaftMaterialStats(1.2f, 0); +livingwood_tc_material.register(); + +// TC Mana String +val manastring_tc_material = mods.contenttweaker.tconstruct.MaterialBuilder.create("manastring"); +manastring_tc_material.color = 0xaff8ff; +manastring_tc_material.craftable = true; +manastring_tc_material.castable = false; +manastring_tc_material.representativeItem = ; +manastring_tc_material.addItem(); +manastring_tc_material.addBowStringMaterialStats(1.0f); +manastring_tc_material.register(); + +// TC Manasteel +val manasteel_material = MaterialSystem.getMaterialBuilder().setName("Manasteel").setColor(Color.fromHex("006BFF")).build(); +val manasteel_l = manasteel_material.registerPart("molten").getData(); +manasteel_l.addDataValue("temperature", 500); +manasteel_l.addDataValue("viscosity", 8000); +manasteel_l.addDataValue("luminosity", 9); +manasteel_material.registerPart("gear"); +manasteel_material.registerPart("plate"); + +val manasteel_tc_material = mods.contenttweaker.tconstruct.MaterialBuilder.create("manasteel"); +manasteel_tc_material.color = 0x006BFF; +manasteel_tc_material.liquid = ; +manasteel_tc_material.craftable = false; +manasteel_tc_material.castable = true; +manasteel_tc_material.representativeItem = ; +manasteel_tc_material.addItem(, 1296); +manasteel_tc_material.addItem(); +manasteel_tc_material.addItem(, 16); +manasteel_tc_material.addHeadMaterialStats(310, 6.0f, 4.0f, 3); +manasteel_tc_material.addHandleMaterialStats(0.85f, 60); +manasteel_tc_material.addExtraMaterialStats(50); +manasteel_tc_material.addBowMaterialStats(2.0f, 1.5f, 7.0f); +manasteel_tc_material.register(); + +// TC Terrasteel +val terrasteel_material = MaterialSystem.getMaterialBuilder().setName("Terrasteel").setColor(Color.fromHex("64EF33")).build(); +val terrasteel_l = terrasteel_material.registerPart("molten").getData(); terrasteel_l.addDataValue("temperature", 500); terrasteel_l.addDataValue("viscosity", 8000); terrasteel_l.addDataValue("luminosity", 9); +terrasteel_material.registerPart("gear"); +terrasteel_material.registerPart("plate"); + +val terrasteel_tc_material = mods.contenttweaker.tconstruct.MaterialBuilder.create("terrasteel"); +terrasteel_tc_material.color = 0x64EF33; +terrasteel_tc_material.liquid = ; +terrasteel_tc_material.craftable = false; +terrasteel_tc_material.castable = true; +terrasteel_tc_material.representativeItem = ; +terrasteel_tc_material.addItem(, 1296); +terrasteel_tc_material.addItem(); +terrasteel_tc_material.addItem(, 16); +terrasteel_tc_material.addHeadMaterialStats(720, 7.0f, 7.0f, 4); +terrasteel_tc_material.addHandleMaterialStats(1.25f, 150); +terrasteel_tc_material.addExtraMaterialStats(60); +terrasteel_tc_material.addBowMaterialStats(2.0f, 1.6f, 8.0f); +terrasteel_tc_material.register(); // Molten Elementium -val elementium_l = MaterialSystem.getMaterialBuilder().setName("Elementium").setColor(Color.fromHex("E90081")).build().registerPart("molten").getData(); +val elementium_material = MaterialSystem.getMaterialBuilder().setName("Elementium").setColor(Color.fromHex("E90081")).build(); +val elementium_l = elementium_material.registerPart("molten").getData(); elementium_l.addDataValue("temperature", 500); elementium_l.addDataValue("viscosity", 8000); elementium_l.addDataValue("luminosity", 9); +elementium_material.registerPart("gear"); +elementium_material.registerPart("plate"); + +val elementium_tc_material = mods.contenttweaker.tconstruct.MaterialBuilder.create("elementium"); +elementium_tc_material.color = 0xE90081; +elementium_tc_material.liquid = ; +elementium_tc_material.craftable = false; +elementium_tc_material.castable = true; +elementium_tc_material.representativeItem = ; +elementium_tc_material.addItem(, 1296); +elementium_tc_material.addItem(); +elementium_tc_material.addItem(, 16); +elementium_tc_material.addHeadMaterialStats(515, 6.5f, 6.0f, 3); +elementium_tc_material.addHandleMaterialStats(1.05f, 110); +elementium_tc_material.addExtraMaterialStats(50); +elementium_tc_material.addBowMaterialStats(2.0f, 1.6f, 7.0f); +elementium_tc_material.register(); // Molten Gaia Spirit Ingot -val gaia_l = MaterialSystem.getMaterialBuilder().setName("Gaia Spirit").setColor(Color.fromHex("EEEEEE")).build().registerPart("molten").getData(); +val gaia_material = MaterialSystem.getMaterialBuilder().setName("Gaia Spirit").setColor(Color.fromHex("EEEEEE")).build(); +val gaia_l = gaia_material.registerPart("molten").getData(); gaia_l.addDataValue("temperature", 500); gaia_l.addDataValue("viscosity", 8000); gaia_l.addDataValue("luminosity", 9); // Molten Botanic Alloy -val alloy_l = MaterialSystem.getMaterialBuilder().setName("Botanic Alloy").setColor(Color.fromHex("00DCFF")).build().registerPart("molten").getData(); +val alloy_material = MaterialSystem.getMaterialBuilder().setName("Botanic Alloy").setColor(Color.fromHex("00DCFF")).build(); +val alloy_l = alloy_material.registerPart("molten").getData(); alloy_l.addDataValue("temperature", 800); alloy_l.addDataValue("viscosity", 6000); alloy_l.addDataValue("luminosity", 15); +// Ingot and block must be registered with vanilla factory to be backwards compatible with PR #109 +// alloy_material.registerPart("ingot"); +// alloy_material.registerPart("block"); +alloy_material.registerPart("gear"); +alloy_material.registerPart("plate"); +alloy_material.registerPart("nugget"); // Botanic Alloy Ingot val alloy_i = VanillaFactory.createItem("botanic_alloy"); diff --git a/scripts/_oredict.zs b/scripts/_oredict.zs index 5d50a6c..24b7869 100644 --- a/scripts/_oredict.zs +++ b/scripts/_oredict.zs @@ -31,3 +31,7 @@ import crafttweaker.item.IItemStack; , ]); + +// botanic alloy +.add(); +.add(); From c6428a0d6aaaa2fbeaeefd5f7254b3d089cd7cfd Mon Sep 17 00:00:00 2001 From: Jonas <17405009+J0B10@users.noreply.github.com> Date: Fri, 11 Feb 2022 18:48:46 +0100 Subject: [PATCH 3/4] Add crafting recipes for new materials & items --- scripts/_base.zs | 38 +++++++++++++++++++++ scripts/botania.zs | 85 +++++++++++++++++++++++----------------------- 2 files changed, 81 insertions(+), 42 deletions(-) diff --git a/scripts/_base.zs b/scripts/_base.zs index 40a3b2b..19ff9b1 100644 --- a/scripts/_base.zs +++ b/scripts/_base.zs @@ -1,7 +1,45 @@ import crafttweaker.item.IItemStack; +import crafttweaker.item.IIngredient; +import crafttweaker.liquid.ILiquidStack; // Disable item by removing crafting recipes and hiding function disable(input as IItemStack) { recipes.remove(input); mods.jei.JEI.removeAndHide(input); } + +//helper method for registering melting and casting of molten metals +function addMoltenMetal(molten as ILiquidStack, nugget as IIngredient, nuggetTemp as int, nuggetCastingTime as int, ingot as IIngredient, ingotTemp as int, ingotCastingTime as int, block as IIngredient, blockTemp as int, blockCastingTime as int) { + if (!isNull(ingot)) { + mods.tconstruct.Melting.addRecipe(molten * 144, ingot, ingotTemp + 300); + mods.tconstruct.Casting.addTableRecipe(ingot.itemArray[0], , molten, 144, false, ingotCastingTime); + } + if (!isNull(block)) { + mods.tconstruct.Melting.addRecipe(molten * 1296, block, blockTemp + 300); + mods.tconstruct.Casting.addBasinRecipe(block.itemArray[0], null, molten, 1296, false, blockCastingTime); + } + if (!isNull(nugget)) { + mods.tconstruct.Melting.addRecipe(molten * 16, nugget, nuggetTemp + 300); + mods.tconstruct.Casting.addTableRecipe(nugget.itemArray[0], , molten, 16, false, nuggetCastingTime); + } +} + +//helper method adding compression and decompression recipes for a material +function addCompressionRecipes(alias as string, nugget as IIngredient, ingot as IIngredient, block as IIngredient) { + if (!isNull(nugget) && !isNull(ingot)) { + recipes.addShapeless(alias + "_decompress_ingot", nugget.itemArray[0] * 9, [ingot]); + recipes.addShaped(alias + "_compress_nugget", ingot.itemArray[0], [ + [nugget, nugget, nugget], + [nugget, nugget, nugget], + [nugget, nugget, nugget] + ]); + } + if (!isNull(ingot) && !isNull(block)) { + recipes.addShapeless(alias + "_decompress_block", ingot.itemArray[0] * 9, [block]); + recipes.addShaped(alias + "_compress_ingot", block.itemArray[0], [ + [ingot, ingot, ingot], + [ingot, ingot, ingot], + [ingot, ingot, ingot] + ]); + } +} diff --git a/scripts/botania.zs b/scripts/botania.zs index fb73670..c801770 100644 --- a/scripts/botania.zs +++ b/scripts/botania.zs @@ -1,4 +1,6 @@ import crafttweaker.item.IItemStack; +import scripts._base.addMoltenMetal; +import scripts._base.addCompressionRecipes; // Deactiate pebble crafting recipes.removeShapeless(, [,,,]); @@ -25,50 +27,49 @@ mods.jei.JEI.addDescription(, [ "Use the wooden bowl to take a sip of water..." ]); -// Terrasteel melting -mods.tconstruct.Melting.addRecipe( * 1296, , 400 + 300); -mods.tconstruct.Melting.addRecipe( * 144, , 200 + 300); -mods.tconstruct.Melting.addRecipe( * 16, , 50 + 300); - -// Terrasteel casting -mods.tconstruct.Casting.addBasinRecipe(, null, , 1296, false, 540); -mods.tconstruct.Casting.addTableRecipe(, , , 144, false, 60); -mods.tconstruct.Casting.addTableRecipe(, , , 16, false, 7); - -// Elementium melting -mods.tconstruct.Melting.addRecipe( * 1296, , 350 + 300); -mods.tconstruct.Melting.addRecipe( * 144, , 175 + 300); -mods.tconstruct.Melting.addRecipe( * 16, , 75 + 300); - -// Elementium casting -mods.tconstruct.Casting.addBasinRecipe(, null, , 1296, false, 540); -mods.tconstruct.Casting.addTableRecipe(, , , 144, false, 60); -mods.tconstruct.Casting.addTableRecipe(, , , 16, false, 7); - -// Gaia spirit melting -mods.tconstruct.Melting.addRecipe( * 144, , 200 + 300); - -// Gaia spirit casting -mods.tconstruct.Casting.addTableRecipe(, , , 144, false, 60); - -// Botanic Alloy melting -mods.tconstruct.Melting.addRecipe( * 1296, , 700 + 300); -mods.tconstruct.Melting.addRecipe( * 144, , 400 + 300); - -// Botanic Alloy casting -mods.tconstruct.Casting.addBasinRecipe(, null, , 1296, false, 540); -mods.tconstruct.Casting.addTableRecipe(, , , 144, false, 60); - -// Botanic Alloy alloying +//Manasteel +addMoltenMetal(, , 75, 7, , 200, 60, , 400, 420); +mods.tconstruct.Melting.addRecipe( * 576, , 500); +mods.tconstruct.Melting.addRecipe( * 144, , 500); +mods.tconstruct.Casting.addTableRecipe(, , , 576, false, 180); +mods.tconstruct.Casting.addTableRecipe(, , , 144, false, 60); +//For some strange reason these recipes already exist for terrasteel & manasteel but must be crated for elementium & botanic alloy +//mods.immersiveengineering.MetalPress.addRecipe(, , , 2400, 4); +//mods.immersiveengineering.MetalPress.addRecipe(, , , 2400); + + +// Terrasteel +addMoltenMetal(, , 75, 7, , 200, 60, , 400, 420); +mods.tconstruct.Melting.addRecipe( * 576, , 500); +mods.tconstruct.Melting.addRecipe( * 144, , 500); +mods.tconstruct.Casting.addTableRecipe(, , , 576, false, 180); +mods.tconstruct.Casting.addTableRecipe(, , , 144, false, 60); +//mods.immersiveengineering.MetalPress.addRecipe(, , , 2400, 4); +//mods.immersiveengineering.MetalPress.addRecipe(, , , 2400); + +// Elementium +addMoltenMetal(, , 75, 7, , 175, 60, , 350, 420); +mods.tconstruct.Melting.addRecipe( * 576, , 500); +mods.tconstruct.Melting.addRecipe( * 144, , 500); +mods.tconstruct.Casting.addTableRecipe(, , , 576, false, 180); +mods.tconstruct.Casting.addTableRecipe(, , , 144, false, 60); +mods.immersiveengineering.MetalPress.addRecipe(, , , 2400, 4); +mods.immersiveengineering.MetalPress.addRecipe(, , , 2400); + +// Gaia spirit +addMoltenMetal(, null, -1, -1, , 200, 60, null, -1, -1); + +// Botanic Alloy mods.tconstruct.Alloy.addRecipe( * 2, [, , * 2]); +addMoltenMetal(, , 125, 7, , 400, 60, , 700, 540); +addCompressionRecipes("botanic_alloy", , , ); +mods.tconstruct.Melting.addRecipe( * 576, , 500); +mods.tconstruct.Melting.addRecipe( * 144, , 500); +mods.tconstruct.Casting.addTableRecipe(, , , 576, false, 180); +mods.tconstruct.Casting.addTableRecipe(, , , 144, false, 60); +mods.immersiveengineering.MetalPress.addRecipe(, , , 2400, 4); +mods.immersiveengineering.MetalPress.addRecipe(, , , 2400); -// Botanic Alloy crafting -recipes.addShaped("botanicAlloyCompressIngot", , [ - [, , ], - [, , ], - [, , ] -]); -recipes.addShapeless("botanicAlloyDecompressBlock", * 9, []); //Like Handheld Advanced Crafting but for the Assembly Halo recipes.remove(); From cbf63a17de0d64f2c22a8f7d3a264011c28b8580 Mon Sep 17 00:00:00 2001 From: Jonas <17405009+J0B10@users.noreply.github.com> Date: Fri, 11 Feb 2022 22:13:09 +0100 Subject: [PATCH 4/4] Added material traits & Dreamwood --- resources/contenttweaker/lang/en_us.lang | 8 +++ scripts/_new.zs | 83 +++++++++++++++++++++++- 2 files changed, 89 insertions(+), 2 deletions(-) diff --git a/resources/contenttweaker/lang/en_us.lang b/resources/contenttweaker/lang/en_us.lang index 3d71c35..0420d1a 100644 --- a/resources/contenttweaker/lang/en_us.lang +++ b/resources/contenttweaker/lang/en_us.lang @@ -10,4 +10,12 @@ material.manasteel.name=Manasteel material.terrasteel.name=Terrasteel material.elementium.name=Elementium material.livingwood.name=Livingwood +material.dreamwood.name=Dreamwood material.manastring.name=Manastring +modifier.mana.name=Mana +modifier.mana.desc=§oBlue Power!§r\nConsumes mana to repair itself. +modifier.aura.name=Aura I +modifier.aura.desc=§oOut of nowhere!§r\nSlowly generates mana when held in hand. +modifier.auragreater.name=Aura II +modifier.auragreater.desc=§oMoooore Maaaana!§r\nGenerates mana when held in hand.\n5 times faster than at level I. + diff --git a/scripts/_new.zs b/scripts/_new.zs index bf47c38..082316b 100644 --- a/scripts/_new.zs +++ b/scripts/_new.zs @@ -1,8 +1,11 @@ #loader contenttweaker import mods.contenttweaker.VanillaFactory; +import mods.contenttweaker.tconstruct.TraitBuilder; import mods.contenttweaker.MaterialSystem; import mods.contenttweaker.Color; import mods.contenttweaker.BlockMaterial; +import mods.manatweaks.DamageHelper; +import mods.manatweaks.ManaHandler; import crafttweaker.item.IItemStack; // New mysterious sawdust recipe @@ -17,6 +20,47 @@ kappa.register(); val morph = VanillaFactory.createItem("morph_rod"); morph.register(); +// TC Traits +val trait_mana = TraitBuilder.create("mana"); +trait_mana.color = 0x006BFF; +trait_mana.onUpdate = function(trait, tool, world, player, slot, selected) { + player.manaRepairSlot(slot, 60, 1); +}; +trait_mana.onToolDamage = function(trait, tool, amount, newAmount, player) { + if (newAmount <= 0) { + return newAmount; + } else { + val regen = ManaHandler.requestMana(player, newAmount * 60, false) / 60; + ManaHandler.requestMana(player, regen * 60, true); + return newAmount - regen; + } +}; +trait_mana.register(); + +val trait_aura = TraitBuilder.create("aura"); +trait_aura.color = 0xE23DBB; +trait_aura.onUpdate = function(trait, tool, world, player, slot, selected) { + if (selected) { + if (world.time % 10 == 0) { + ManaHandler.dispatchMana(player, 1, true); + } + } +}; +trait_aura.addItem(); +trait_aura.register(); + +val trait_auragreater = TraitBuilder.create("auragreater"); +trait_auragreater.color = 0xE23DBB; +trait_auragreater.onUpdate = function(trait, tool, world, player, slot, selected) { + if (selected) { + if (world.time % 2 == 0) { + ManaHandler.dispatchMana(player, 1, true); + } + } +}; +trait_auragreater.addItem(); +trait_auragreater.register(); + // TC Livingwood val livingwood_tc_material = mods.contenttweaker.tconstruct.MaterialBuilder.create("livingwood"); livingwood_tc_material.color = 0x2C120A; @@ -24,15 +68,46 @@ livingwood_tc_material.craftable = true; livingwood_tc_material.castable = false; livingwood_tc_material.representativeItem = ; livingwood_tc_material.addItem(); -livingwood_tc_material.addItem(, 288); +livingwood_tc_material.addItem(); livingwood_tc_material.addItem(, 288); -livingwood_tc_material.addHeadMaterialStats(45, 2.0f, 2.0f, 1); +livingwood_tc_material.addHeadMaterialStats(45, 2.0f, 2.0f, 0); livingwood_tc_material.addHandleMaterialStats(1.1f, 25); livingwood_tc_material.addExtraMaterialStats(20); livingwood_tc_material.addBowMaterialStats(1.0f, 1.0f, 0.0f); livingwood_tc_material.addArrowShaftMaterialStats(1.2f, 0); +livingwood_tc_material.addMaterialTrait("ecological", "head"); +livingwood_tc_material.addMaterialTrait("aura", "head"); +livingwood_tc_material.addMaterialTrait("ecological", "handle"); +livingwood_tc_material.addMaterialTrait("aura", "handle"); +livingwood_tc_material.addMaterialTrait("ecological", "extra"); +livingwood_tc_material.addMaterialTrait("aura", "extra"); +livingwood_tc_material.addMaterialTrait("ecological", "bow"); +livingwood_tc_material.addMaterialTrait("aura", "bow"); livingwood_tc_material.register(); +// TC Dreamwood +val dreamwood_tc_material = mods.contenttweaker.tconstruct.MaterialBuilder.create("dreamwood"); +dreamwood_tc_material.color = 0x8FA8A2; +dreamwood_tc_material.craftable = true; +dreamwood_tc_material.castable = false; +dreamwood_tc_material.representativeItem = ; +dreamwood_tc_material.addItem(); +dreamwood_tc_material.addItem(); +dreamwood_tc_material.addItem(, 288); +dreamwood_tc_material.addHeadMaterialStats(35, 1.6f, 0.5f, 0); +dreamwood_tc_material.addHandleMaterialStats(0.8f, -25); +dreamwood_tc_material.addExtraMaterialStats(0); +dreamwood_tc_material.addBowMaterialStats(0.8f, 0.4f, -1); +dreamwood_tc_material.addMaterialTrait("ecological", "head"); +dreamwood_tc_material.addMaterialTrait("auragreater", "head"); +dreamwood_tc_material.addMaterialTrait("ecological", "handle"); +dreamwood_tc_material.addMaterialTrait("auragreater", "handle"); +dreamwood_tc_material.addMaterialTrait("ecological", "extra"); +dreamwood_tc_material.addMaterialTrait("auragreater", "extra"); +dreamwood_tc_material.addMaterialTrait("ecological", "bow"); +dreamwood_tc_material.addMaterialTrait("auragreater", "bow"); +dreamwood_tc_material.register(); + // TC Mana String val manastring_tc_material = mods.contenttweaker.tconstruct.MaterialBuilder.create("manastring"); manastring_tc_material.color = 0xaff8ff; @@ -41,6 +116,7 @@ manastring_tc_material.castable = false; manastring_tc_material.representativeItem = ; manastring_tc_material.addItem(); manastring_tc_material.addBowStringMaterialStats(1.0f); +manastring_tc_material.addMaterialTrait("mana", "bowstring"); manastring_tc_material.register(); // TC Manasteel @@ -65,6 +141,7 @@ manasteel_tc_material.addHeadMaterialStats(310, 6.0f, 4.0f, 3); manasteel_tc_material.addHandleMaterialStats(0.85f, 60); manasteel_tc_material.addExtraMaterialStats(50); manasteel_tc_material.addBowMaterialStats(2.0f, 1.5f, 7.0f); +manasteel_tc_material.addMaterialTrait("mana"); manasteel_tc_material.register(); // TC Terrasteel @@ -89,6 +166,7 @@ terrasteel_tc_material.addHeadMaterialStats(720, 7.0f, 7.0f, 4); terrasteel_tc_material.addHandleMaterialStats(1.25f, 150); terrasteel_tc_material.addExtraMaterialStats(60); terrasteel_tc_material.addBowMaterialStats(2.0f, 1.6f, 8.0f); +terrasteel_tc_material.addMaterialTrait("mana"); terrasteel_tc_material.register(); // Molten Elementium @@ -113,6 +191,7 @@ elementium_tc_material.addHeadMaterialStats(515, 6.5f, 6.0f, 3); elementium_tc_material.addHandleMaterialStats(1.05f, 110); elementium_tc_material.addExtraMaterialStats(50); elementium_tc_material.addBowMaterialStats(2.0f, 1.6f, 7.0f); +elementium_tc_material.addMaterialTrait("mana"); elementium_tc_material.register(); // Molten Gaia Spirit Ingot