#Can't make an item unbreakable.
34 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
did you try... .unbreakable()
i didnt find mention of it on the wiki
ill try it now
unless im doing it wrong its telling me that it cant find the function.
// You can specify item type as 2nd argument in create(), some types have different available methods
event.create('quantum_pickaxe', 'pickaxe')
.tier('netherite')
.displayName('Quantum Pickaxe')
.unstackable()
.fireResistant(true)
.rarity('Epic')
.modifyTier(tier => tier.speed=5000)
.tooltip('work please man')
.unbreakable()
})```
this is my code
i set .maxDamage(0) and it is still breaking
hm, not sure what could be wrong then
im going to try to use the modify item
i tried modify item with both 0 and -1. didnt seem to work either
It looks like durability is controlled by tool tier
so you need to make a tool tier that is unbreakable
.modifyTier(tier => {
tier.speed = 5000
tier.uses = 0
})
is tier modification fixed yet
its broken?
i also did tier modification, that did not seem to make it unbreakable. for now i just set the tier.uses to maxint
would there be a way to apply the unbreakable nbt that you can add with /give to the crafting result
Yeah with components, 'kubejs:quantum_pickaxe[unbreakable={}]' iirc
I did try that but it couldn't read the value
event.custom({
"type": "modern_industrialization:packer",
"duration": 200,
"eu": 1000000,
"item_inputs": [
{
"amount": 1,
"item": "minecraft:netherite_pickaxe"
},
{
"amount": 1,
"item": "modern_industrialization:quantum_upgrade"
}
],
"item_outputs": [
{
"amount": 1,
"item": "kubejs:quantum_pickaxe[unbreakable={}]"
}
]
})
console.log('quan_pick recipe')
})```
if i put it here, i get this error
oh thats a custom json recipe
yeah that wont work
you need to use vanilla format then
"item": "kubejs:quantum_pickaxe",
"components": {
"minecraft:unbreakable": {"show_in_tooltip": false}
}
I think
ill try to fix mutable tiers tho
it shouldnt be like that
that worked! thank you very much