#Custom tools wont accept new repair ingredient
59 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
what?
anyways uh, replace repairIngredient with item.repairIngredient
??sendcode
Send your code here instead of a screenshot
It makes it easier to diagnose your code and help you fix it or make the required changes/additions.
Paste version of modifications.js from @oblique coral
instead of item modification try modifying the tier on startup
StartupEvents.registry("item", event => {
event.create("test", "sword")
.maxDamage(15)
.modifyTier(tier => {
tier.setRepairIngredient(Ingredient.of("minecraft:copper_ingot"))
})
})```
isn't repairIngredient from the tier
yeah I think
this i can confirm works
yup
So like Ingredient repairIngredient = () ?
no
this in your tool builder js .modifyTier(tier => { tier.setRepairIngredient(Ingredient.of("minecraft:copper_ingot")) })
not the item modification event
So this goes in the tool registry?
okk I'll try this rn
I'm guessing this must be included inside the }) of the registrered tools?
Paste version of custom_tools.js from @oblique coral
like you would the other variables js StartupEvents.registry('item', event => { event.create('charged_copper_forged_scythe', 'sword') .tier('diamond') .attackDamageBaseline(14.0) .maxStackSize(1) .glow(true) .displayName('Charged Copper Forged Scythe') .modifyTier(tier => { tier.setRepairIngredient(Ingredient.of("minecraft:copper_ingot")) }) event.create('charged_copper_forged_pickaxe', 'pickaxe').tier('diamond').maxStackSize(1).glow(true).displayName('Charged Copper Forged Pickaxe') event.create('charged_copper_forged_axe', 'axe').tier('diamond').maxStackSize(1).glow(true).displayName('Charged Copper Forged Axe') event.create('charged_copper_forged_shovel', 'shovel').tier('diamond').maxStackSize(1).glow(true).displayName('Charged Copper Forged Shovel') })
yup!
So basically this part for every tool
yup

I can just wing it and let it just use diamonds?
lemme test something
okk
do this js .modifyTier(tier => { tier.setLevel(3) tier.setUses(1561) tier.setSpeed(8) tier.setAttackDamageBonus(3) tier.setEnchantmentValue(10) tier.setRepairIngredient(Ingredient.custom(item => { if (item.id == "kubejs:copper_forged_alloy") return true; return false; })) })
for whatever reason its not detecting the forged alloy with Ingredient.of() on startup probably because its a custom item and the event registry orde r is random with kjs
okay I'll give it a try rn
kk
i removedthe diamond tier line just to manually impliment the diamond tier myself and i can confirm it works without it so if this doesnt work for you then just remove this line here js .tier('diamond')
Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.
Do you have any other questions regarding your issue? Feel free to ask!
Note: You should generally create a new post for unrelated issues.
Ticket closed!
im currently struggling to get it to use flint for item repair
instead of necroing an old post open up a new one please
