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 TypeMethodDescriptionbreakTime
(double second) 控制自定义方块客户端侧的挖掘时间(单位秒)build()
clientFriction
(float friction) 客户端摩擦系数,用于控制玩家在自定义方块上行走的速度,值越大,移动越快。collisionBox
(Vector3f origin, Vector3f size) 设置此方块的客户端碰撞箱。creativeGroup
(ItemCreativeGroup creativeGroup) 控制自定义方块在创造栏中的组。creativeGroup
(String creativeGroup) 控制自定义方块在创造栏中的组。customBuild
(Consumer<CompoundTag> nbt) 对要发送给客户端的方块ComponentNBT进行自定义处理,这里包含了所有对自定义方块的定义。在符合条件的情况下,你可以任意修改。控制自定义方块的几何模型,如果不设置默认为单位立方体permutation
(Permutation permutation) 控制自定义方块的变化特征,例如条件渲染,部分渲染等permutations
(Permutation... permutations) 控制自定义方块的变化特征,例如条件渲染,部分渲染等以度为单位设置块围绕立方体中心的旋转,旋转顺序为 xyz.角度必须是90的倍数。selectionBox
(Vector3f origin, Vector3f size) 设置此方块的客户端选择箱。transformation
(Transformation transformation) supports rotation, scaling, and translation.
-
Field Details
-
identifier
-
customBlock
-
nbt
-
-
Constructor Details
-
Builder
protected Builder(CustomBlock customBlock, Materials materials, BlockCreativeCategory blockCreativeCategory)
-
-
Method Details
-
breakTime
控制自定义方块客户端侧的挖掘时间(单位秒)自定义方块的挖掘时间取决于服务端侧和客户端侧中最小的一个
Control the digging time (in seconds) on the client side of the custom block
The digging time of a custom cube depends on the smallest of the server-side and client-side
-
creativeGroup
控制自定义方块在创造栏中的组。Control the grouping of custom blocks in the creation inventory.
- See Also:
-
creativeGroup
控制自定义方块在创造栏中的组。Control the grouping of custom blocks in the creation inventory.
- See Also:
-
transformation
supports rotation, scaling, and translation. The component can be added to the whole block and/or to individual block permutations. Transformed geometries still have the same restrictions that non-transformed geometries have such as a maximum size of 30/16 units. -
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
-
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 -
permutation
控制自定义方块的变化特征,例如条件渲染,部分渲染等Control custom block permutation features such as conditional rendering, partial rendering, etc.
-
permutations
控制自定义方块的变化特征,例如条件渲染,部分渲染等Control custom block permutation features such as conditional rendering, partial rendering, etc.
-
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
-
blockTags
-
clientFriction
客户端摩擦系数,用于控制玩家在自定义方块上行走的速度,值越大,移动越快。the client friction, which is used to control the speed at which the player walks on the custom block.The larger the value, the faster the movement.
-
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
-