Class 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()
collisionBox
(Vector3f origin, Vector3f size) 设置此方块的客户端碰撞箱。creativeGroup
(String creativeGroup) 控制自定义方块在创造栏中的组。customBuild
(@NonNull Consumer<CompoundTag> nbt) 对要发送给客户端的方块ComponentNBT进行自定义处理,这里包含了所有对自定义方块的定义。在符合条件的情况下,你可以任意修改。控制自定义方块的几何模型,如果不设置默认为单位立方体partVisibility
(BoneCondition... boneConditions) 条件渲染自定义方块的部分模型内容。permutations
(@NonNull Permutations permutations) 控制自定义方块的变化特征,例如条件渲染,部分渲染等以度为单位设置块围绕立方体中心的旋转,旋转顺序为 xyz.角度必须是90的倍数。selectionBox
(Vector3f origin, Vector3f size) 设置此方块的客户端选择箱。
-
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.
-
partVisibility
条件渲染自定义方块的部分模型内容。Partially render the content of the custom block with conditional rendering.
-
collisionBox
设置此方块的客户端碰撞箱。Set the client collision box for this block.
- Parameters:
origin
- 碰撞箱的原点 The origin of the collision boxsize
- 碰撞箱的大小 The size of the collision box
-
selectionBox
设置此方块的客户端选择箱。Set the client collision box for this block.
- Parameters:
origin
- 选择箱的原点 The origin of the collision boxsize
- 选择箱的大小 The size of the collision box
-
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
-