Package cn.nukkit.block.customblock
Interface CustomBlock
public interface CustomBlock
继承这个类实现自定义方块
重写Block中的方法控制方块属性
-
Method Summary
Modifier and TypeMethodDescriptiondouble
default CompoundTag
componentNBTProcessor
(CompoundTag componentNBT) 对自动生成的ComponentNBT进行处理default BlockPropertyData
default String
控制自定义方块在创造栏中的分类,默认值constructiondefault String
控制自定义方块在创造栏中的组double
default String
控制自定义方块的形状
Geometry identifier from geo file in 'RP/models/blocks' folderdefault int
getId()
int
int
default CompoundTag
将几何文件中的face(面)名称映射到实际的材质实例default String
getName()
控制自定义方块的命名空间
(例如 wiki:test_block)default ListTag<CompoundTag>
控制自定义方块的客户端状态default ListTag<CompoundTag>
获取方块属性NBT定义double
default Vector3
以度为单位设置块围绕立方体中心的旋转,旋转顺序为 xyz.角度必须是90的倍数。控制自定义方块所用的材质名称
(例如材质图片test.png设置test)default Block
default Block
toCustomBlock
(int meta) toItem()
-
Method Details
-
getNamespace
String getNamespace()控制自定义方块的命名空间
(例如 wiki:test_block) -
getTexture
String getTexture()控制自定义方块所用的材质名称
(例如材质图片test.png设置test) -
getFrictionFactor
double getFrictionFactor() -
getResistance
double getResistance() -
getLightFilter
int getLightFilter() -
getLightLevel
int getLightLevel() -
calculateBreakTime
double calculateBreakTime() -
getId
default int getId() -
getName
-
toItem
Item toItem() -
toCustomBlock
-
toCustomBlock
-
getCreativeCategory
控制自定义方块在创造栏中的分类,默认值construction- See Also:
-
getCreativeCategoryGroup
控制自定义方块在创造栏中的组- See Also:
-
getMaterials
将几何文件中的face(面)名称映射到实际的材质实例 -
getRotation
以度为单位设置块围绕立方体中心的旋转,旋转顺序为 xyz.角度必须是90的倍数。 -
getBlockTags
-
getGeometry
控制自定义方块的形状
Geometry identifier from geo file in 'RP/models/blocks' folder -
getPermutations
控制自定义方块的客户端状态- Returns:
- Permutations NBT Tag
-
getPropertiesNBT
获取方块属性NBT定义- Returns:
- BlockProperties in NBT Tag format
-
componentNBTProcessor
对自动生成的ComponentNBT进行处理- Parameters:
componentNBT
- 自动生成的component NBT- Returns:
- 处理后的ComponentNBT
-
getBlockPropertyData
-