Импорт класса

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
Copy
import crafttweaker.api.item.block.BlockItem;

Extending MCItemDefinition

Link to extending-mcitemdefinition

BlockItem extends MCItemDefinition. That means all methods available in MCItemDefinition are also available in BlockItem

Тип результатаЯвляется неявным
Тип результата
MCBlock?
Является неявным
false

Name: getBlock

Return Type: MCBlock?

ZenScript
Copy
// BlockItem.getBlock() as MCBlock?

myBlockItem.getBlock();

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
block
Тип
MCBlock?
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided