IBlockPattern
Link to iblockpattern
An IBlockPattern is an interface that allows for combining several blocks into one object.
It is comparable to what the IIngredient Interface is to IItemStacks.
Импорт пакета
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.
import crafttweaker.block.IBlockPattern;
Получение объекта IBlockPattern
Link to получение-объекта-iblockpattern
Technically, each time you call an IBlock object, you call an IBlockPattern object.
But there are cases when you explicitly get an IBlockPattern Object as return.
- OR two IBlocks
ZenGetters
Link to zengetters
ZenGetter | What does it do | Возвращаемый тип |
---|---|---|
ZenGetter blocks | What does it do Перечисляет весе возможные блоки для этого объекта | Возвращаемый тип List<IBlock> |
ZenGetter displayName | What does it do Returns the displayNames of the fitting blocks | Возвращаемый тип string |
You can OR two IBlockPattern Objects using the OR |
Operator
Matching
Link to matching
You can check if an IBlockPatternObject contains another using the in
keyword.
For example, you could check if a Block is in an IBlockPattern.