Package cn.nukkit.block.customblock
Class CustomBlockDefinition.Builder
java.lang.Object
cn.nukkit.block.customblock.CustomBlockDefinition.Builder
- Enclosing class:
- CustomBlockDefinition
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CustomBlock
protected final String
protected CompoundTag
-
Constructor Summary
ModifierConstructorDescriptionprotected
Builder
(CustomBlock customBlock, Materials materials, BlockCreativeCategory blockCreativeCategory) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
creativeGroup
(String creativeGroup) 控制自定义方块在创造栏中的组。customBuild
(@NonNull Consumer<CompoundTag> nbt) 对要发送给客户端的方块ComponentNBT进行自定义处理,这里包含了所有对自定义方块的定义。在符合条件的情况下,你可以任意修改。控制自定义方块的几何模型,如果不设置默认为单位立方体permutations
(@NonNull Permutations permutations) 控制自定义方块的变化特征,例如条件渲染,部分渲染等以度为单位设置块围绕立方体中心的旋转,旋转顺序为 xyz.角度必须是90的倍数。
-
Field Details
-
identifier
-
customBlock
-
nbt
-
-
Constructor Details
-
Builder
protected Builder(CustomBlock customBlock, Materials materials, BlockCreativeCategory blockCreativeCategory)
-
-
Method Details
-
creativeGroup
控制自定义方块在创造栏中的组。Control the grouping of custom blocks in the creation inventory.
- See Also:
-
rotation
以度为单位设置块围绕立方体中心的旋转,旋转顺序为 xyz.角度必须是90的倍数。Set the rotation of the block around the center of the block in degrees, the rotation order is xyz. The angle must be a multiple of 90.
-
geometry
控制自定义方块的几何模型,如果不设置默认为单位立方体Control the geometric model of the custom block, if not set the default is the unit cube.
Geometry identifier from geo file in 'RP/models/blocks' folder -
permutations
控制自定义方块的变化特征,例如条件渲染,部分渲染等Control custom block permutation features such as conditional rendering, partial rendering, etc.
-
customBuild
对要发送给客户端的方块ComponentNBT进行自定义处理,这里包含了所有对自定义方块的定义。在符合条件的情况下,你可以任意修改。Custom processing of the block to be sent to the client ComponentNBT, which contains all definitions for custom block. You can modify them as much as you want, under the right conditions.
-
build
-