NamePlateResult
Link to nameplateresult
Импорт класса
Link to импорт-класса
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.entity.NamePlateResult;
Методы
Link to методы
Name: alwaysRender
Forces the nameplate to be visible even when it would otherwise not be.
ZenScript Copy// NamePlateResult.alwaysRender()
myNamePlateResult.alwaysRender();
Name: getContent
Gets the current content of the nameplate. This can be changed by mods.
Returns: The current nameplate content.
Return Type: Component
ZenScript Copy// NamePlateResult.getContent() as Component
myNamePlateResult.getContent();
Name: getOriginalContent
Gets the original content of the nameplate. This can not be changed by mods.
Returns: The original nameplate content.
Return Type: Component
ZenScript Copy// NamePlateResult.getOriginalContent() as Component
myNamePlateResult.getOriginalContent();
Name: noRender
Forces the display name to not render even when it should.
ZenScript Copy// NamePlateResult.noRender()
myNamePlateResult.noRender();
Name: setContent
Sets the new content of the nameplate.
ZenScript CopyNamePlateResult.setContent(content as Component)
Параметр | Тип | Описание |
---|---|---|
Параметр контент | Тип Component | Описание The new nameplate contents. |
Name: setDefault
Sets the default vanilla behaviour of rendering nameplates.
ZenScript Copy// NamePlateResult.setDefault()
myNamePlateResult.setDefault();
Свойства
Link to свойства
Название | Тип | Имеет Getter | Имеет Setter | Описание |
---|---|---|---|---|
Название контент | Тип Component | Имеет Getter true | Имеет Setter true | Описание Gets the current content of the nameplate. This can be changed by mods. |
Название originalContent | Тип Component | Имеет Getter true | Имеет Setter false | Описание Gets the original content of the nameplate. This can not be changed by mods. |