Package cn.nukkit.block.customblock
Interface CustomBlock
public interface CustomBlock
继承这个类实现自定义方块
重写Block中的方法控制方块属性
-
Method Summary
Modifier and TypeMethodDescriptiondouble
default BlockPropertyData
default String
控制自定义方块在创造栏中的分类,默认值constructiondefault String
控制自定义方块在创造栏中的组double
default String
控制自定义方块的形状
Geometry identifier from geo file in 'RP/models/entity' folderdefault int
getId()
int
int
default String
getName()
控制自定义方块的命名空间
(例如 wiki:test_block)default String
控制自定义方块的渲染方法double
控制自定义方块所用的材质名称
(例如材质图片test.png设置test)default Block
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() -
toItem
Item toItem() -
toCustomBlock
-
getCreativeCategory
控制自定义方块在创造栏中的分类,默认值construction- See Also:
-
getCreativeCategoryGroup
控制自定义方块在创造栏中的组- See Also:
-
getRenderMethod
控制自定义方块的渲染方法可选值:
opaque
alpha_test
blend
double_sided默认值: "opaque"
-
getGeometry
控制自定义方块的形状
Geometry identifier from geo file in 'RP/models/entity' folder -
getId
default int getId() -
getName
-
getBlockPropertyData
-