xt9 / Modpack-Series-Examples

Examples and scripts for my youtube series "How to make a Minecraft Modpack"
https://www.youtube.com/watch?v=mWV8XBvC5ks&list=PLJB-Y_FDFQZ7zVl-64Eb3hvhtUdLC20fq
29 stars 18 forks source link

need some help #2

Open dawsontech30000 opened 2 months ago

dawsontech30000 commented 2 months ago

like this idea where you add everthing want be able to added tools dont how try so many ways if still active here if could spear some time reply hopfully guide me or help me be mulch appreciated

dawsontech30000 commented 2 months ago

this from git example differnt names

loader contenttweaker

import mods.contenttweaker.Color; import mods.contenttweaker.MaterialSystem;

var color = Color.fromHex("1f1d1d") as Color;

var Blacktiger = MaterialSystem.getMaterialBuilder().setName("Blacktiger").setColor(color).build();

Blacktiger.registerParts(["gear", "plate", "nugget", "ingot", "rod", "dust"] as string[]);

var molten = Blacktiger .registerPart("molten").getData(); molten.addDataValue("temperature", "400"); molten.addDataValue("luminosity", "10");

var block = Blacktiger .registerPart("block").getData(); block.addDataValue("hardness", "5"); block.addDataValue("resistance", "30"); block.addDataValue("harvestTool", "pickaxe");

var ore = Blacktiger.registerPart("ore").getData(); ore.addDataValue("variants", "minecraft:stone"); ore.addDataValue("hardness", "3"); ore.addDataValue("resistance", "15"); ore.addDataValue("harvestLevel", "1"); ore.addDataValue("harvestTool", "pickaxe");

var armor = Blacktiger.registerPart("armor").getData(); armor.addDataValue("durability", "522"); armor.addDataValue("enchantability", "10"); armor.addDataValue("reduction", "2,5,6,2"); armor.addDataValue("toughness", "2");

dawsontech30000 commented 2 months ago

try this try add tools var
cant seem to do if can provide example mulch appreated it need for my 1.12.2 pack

dawsontech30000 commented 2 months ago

crafttweaker.log

[INITIALIZATION][CLIENT][ERROR] [crafttweaker | SIDE_CLIENT]: Error parsing CT\testwithtools.zs:19 -- ] or , expected

//loader contenttweaker

import mods.contenttweaker.Color; import mods.contenttweaker.Material; import mods.contenttweaker.MaterialSystem; import mods.contenttweaker.VanillaFactory;

// Create Color val color = VanillaFactory.createColor(0x568961);

// Create Material val Liam = MaterialSystem.getMaterialBuilder().setName("liam").setColor(color).build();

// Register Material Parts Liam.registerParts("gear", "plate", "nugget", "ingot", "rod", "dust");

Liam.registerPart("molten").withProperties([ "temperature": 400, "luminosity": 10 ]);

Liam.registerPart("block").withProperties([ "hardness": 5.0, "resistance": 30.0, "harvestTool": "pickaxe" ]);

Liam.registerPart("ore").withProperties([ "variants": ["minecraft:stone"], "hardness": 3.0, "resistance": 15.0, "harvestLevel": 1, "harvestTool": "pickaxe" ]);

Liam.registerPart("armor").withProperties([ "durability": 522, "enchantability": 10, "reduction": [2, 5, 6, 2], "toughness": 2.0 ]);

// Create Tool Material val toolMaterial = VanillaFactory.createToolMaterial("liam_tool_material", 3, 2000, 8.0, 3.0, 10);

// Create Tools val sword = VanillaFactory.createSword("liam_sword", toolMaterial); val pickaxe = VanillaFactory.createPickaxe("liam_pickaxe", toolMaterial); val axe = VanillaFactory.createAxe("liam_axe", toolMaterial, 8.0); val shovel = VanillaFactory.createShovel("liam_shovel", toolMaterial); val hoe = VanillaFactory.createHoe("liam_hoe", toolMaterial);

// Set Tool Properties sword.setDamage(8.0); pickaxe.setDamage(3.0); axe.setDamage(6.0); shovel.setDamage(2.5); hoe.setDamage(0.0);

sword.setDurability(2000); pickaxe.setDurability(2000); axe.setDurability(2000); shovel.setDurability(2000); hoe.setDurability(2000);