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;
Calling an IBlockPattern Object
Link to calling-an-iblockpattern-object
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 Lists all possible blocks for this object | 戻り値 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.