#Can't make an item unbreakable.

34 messages · Page 1 of 1 (latest)

pliant crescent
#

tried adding -1 as durability to make an item unbreakable, instead it just breaks of the first block.

honest flintBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

arctic shell
#

did you try... .unbreakable()

pliant crescent
#

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

arctic shell
#

ah, just set maxDamage to 0

#

.maxDamage(0)

pliant crescent
#

i set .maxDamage(0) and it is still breaking

arctic shell
#

hm, not sure what could be wrong then

pliant crescent
#

im going to try to use the modify item

#

i tried modify item with both 0 and -1. didnt seem to work either

severe haven
#

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
})
arctic shell
#

is tier modification fixed yet

severe haven
#

its broken?

arctic shell
pliant crescent
#

i also did tier modification, that did not seem to make it unbreakable. for now i just set the tier.uses to maxint

pliant crescent
#

would there be a way to apply the unbreakable nbt that you can add with /give to the crafting result

severe haven
#

Yeah with components, 'kubejs:quantum_pickaxe[unbreakable={}]' iirc

pliant crescent
#

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

severe haven
#

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

pliant crescent
#

that worked! thank you very much