Interface CustomBlock
-
Method Summary
Modifier and TypeMethodDescriptiondouble
覆写该方法设置自定义方块的被挖掘所需要的时间(单位秒)该方法设置自定义方块的定义double
覆写该方法设置自定义方块的摩擦因数default int
getId()
该方法必须被覆写为使用接口的定义,请使用int
覆写该方法设置自定义方块的吸收光的等级int
覆写该方法设置自定义方块的发出光的等级default String
getName()
该方法必须被覆写为使用接口的定义,请使用@NonNull String
覆写该方法设置自定义方块的命名空间IDdouble
覆写该方法设置自定义方块的爆炸抗性default boolean
default Block
Plugins do not need@Override
default Block
toCustomBlock
(int meta) Plugins do not need@Override
toItem()
一般不需要被覆写,继承父类会提供
-
Method Details
-
getFrictionFactor
double getFrictionFactor()覆写该方法设置自定义方块的摩擦因数@Override
this method to set the friction factor of the custom block -
getResistance
double getResistance()覆写该方法设置自定义方块的爆炸抗性@Override
this method to set the Explosive resistance of the custom block -
getLightFilter
int getLightFilter()覆写该方法设置自定义方块的吸收光的等级@Override
this method to set the level of light absorption of the custom block -
getLightLevel
int getLightLevel()覆写该方法设置自定义方块的发出光的等级@Override
this method to set the level of light emitted by the custom block -
calculateBreakTime
double calculateBreakTime()覆写该方法设置自定义方块的被挖掘所需要的时间(单位秒)@Override
this method to set the amount of time (in seconds) it takes for a custom block to be dug -
getNamespaceId
覆写该方法设置自定义方块的命名空间ID@Override
this method to set the namespace ID of the custom block -
toItem
Item toItem()一般不需要被覆写,继承父类会提供Generally, it does not need to be
@Override
, extend from the parent class will provide -
getDefinition
CustomBlockDefinition getDefinition()该方法设置自定义方块的定义This method sets the definition of custom block
-
getId
default int getId()该方法必须被覆写为使用接口的定义,请使用The method must be
@Override
to use the definition of the interface, please use the
@Override
public int getId() { return CustomBlock.super.getId(); }
-
getName
该方法必须被覆写为使用接口的定义,请使用The method must be
@Override
to use the definition of the interface, please use the
@Override
public String getName() { return CustomBlock.super.getName(); }
-
toCustomBlock
Plugins do not need@Override
- Returns:
- the block
-
toCustomBlock
Plugins do not need@Override
- Returns:
- the block
-
reverseSending
default boolean reverseSending()- Returns:
- 是否反转自定义方块属性解析的顺序
Whether to reverse the order of properties parsing
-