#change item name

1 messages · Page 1 of 1 (latest)

rocky junco
#

Hey, I was wondering how I can change an existing item's name?

frozen zodiacBOT
#

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

quick ginkgo
#

Check the lang Key and overwrite with the client.generate_assets Event or use a json File.

rocky junco
#

dumb it down for me please

digital girderBOT
#

A script to rename items:

ClientEvents.highPriorityAssets(e => {
  const rename = (item, newName) => e.addLang(Item.of(item).item.getDescriptionId(), newName)

  // rename mutton to BAAAAAAA
  rename('minecraft:mutton', "BAAAAAAA")
  // rename all items with e in their path to EEEEEEEEEEEE
  Ingredient.of(/:.*e/).stacks.forEach(item => rename(item, "EEEEEEEEEEEE"))
})

Reloadable with F3 + T

rocky junco
#

and this goes in client scripts?

flint wharf
#

ye

rocky junco
#

how about if I just want to change the color of an item's name?

#

ah thats what you meant

quick ginkgo
rocky junco
#

thanks

rocky junco
#
onEvent('highPriorityAssets', e => {

    const rename = (item, newName) => 
        e.addLang(Item.of(item).getDescriptionId(), newName)

        //rename diamond sword to "Test"
        rename('minecraft:diamond_sword', 'Test')

})
digital girderBOT
#

WIP

rocky junco
#

nvm i did it

onEvent('client.generate_assets', e => {

    const rename = (item, newName) => e.addLang(Item.of(item).item.getDescriptionId(), newName)

        //rename diamond sword to "Test"
        rename('minecraft:diamond_sword', 'Test')

})