Home Getting Started With Scripts Using this wiki Commands CTGUI Global functions Bracket Handlers

ILocalizedNameSupplier

The ILocalizedNameSupplier function is used to programmatically determine an Item’s display name.

importing the class

If you want to import the function’s class, here you go:

script.zs
import mods.contenttweaker.LocalizedNameSupplier;

The function setup

The function returns a string and takes an IItemStack as single input parameter.

script.zs
item.setLocalizedNameSupplier(function(itemStack) {
return "mySuperItem";
});