Interface CustomBlockComponents.Builder
- Enclosing interface:
CustomBlockComponents
public static interface CustomBlockComponents.Builder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds these CustomBlockComponents.collisionBox(@Nullable BoxComponent collisionBox) Deprecated.collisionBoxes(@Nullable Collection<BoxComponent> collisionBoxes) Convenience method to set collision boxes for the block.collisionBoxes(@Nullable BoxComponent... collisionBoxes) Sets up to 16 different collision boxes for the block.destructibleByMining(Float destructibleByMining) Sets the destructible by mining value of the block.displayName(String displayName) Sets the display name of the block.Sets the friction value of the block.geometry(GeometryComponent geometry) Sets the geometry of the block.lightDampening(Integer lightDampening) Sets the light dampening value of the block.lightEmission(Integer lightEmission) Sets the light emission value of the block.materialInstance(@NonNull String name, @NonNull MaterialInstance materialInstance) Sets the material instances of the block.placeAir(boolean placeAir) Whether the block should place only air, overriding the default behavior.placementFilter(List<PlacementConditions> placementConditions) Sets the placement filter of the block.selectionBox(@Nullable BoxComponent selectionBox) Sets a selection box for the block.Sets the set of tags for the block.transformation(TransformationComponent transformation) Sets the transformation of the block.unitCube(boolean unitCube) Deprecated.Usegeometry(GeometryComponent)with `minecraft:geometry.full_block` instead.
-
Method Details
-
selectionBox
Sets a selection box for the block. Unlike Java Edition, there can only be one selection box.- Parameters:
selectionBox- a selection box, or null for none- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
collisionBox
@Deprecated(since="2.9.5") CustomBlockComponents.Builder collisionBox(@Nullable BoxComponent collisionBox) Deprecated.usecollisionBoxes(BoxComponent...)insteadSets a collision box for the block. Can be null to disable collisions.- Parameters:
collisionBox- the collision box to set- Returns:
- this builder
- Since:
- 2.2.0
-
collisionBoxes
Sets up to 16 different collision boxes for the block. Can be null to disable collisions.- Parameters:
collisionBoxes- the collision boxes to set- Returns:
- this builder
- Since:
- 2.9.5
- See Also:
-
collisionBoxes
Convenience method to set collision boxes for the block. Can be null to disable collisions.- Parameters:
collisionBoxes- the collection of collision boxes to set- Returns:
- this builder
- Since:
- 2.9.5
- See Also:
-
displayName
Sets the display name of the block.- Parameters:
displayName- the display name to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
geometry
Sets the geometry of the block.- Parameters:
geometry- the geometry to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
materialInstance
CustomBlockComponents.Builder materialInstance(@NonNull String name, @NonNull MaterialInstance materialInstance) Sets the material instances of the block.- Parameters:
name- the name of the material instancematerialInstance- the material instance to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
placementFilter
Sets the placement filter of the block.- Parameters:
placementConditions- the placement conditions to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
destructibleByMining
Sets the destructible by mining value of the block.- Parameters:
destructibleByMining- the destructible by mining value to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
friction
Sets the friction value of the block.- Parameters:
friction- the friction value to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
lightEmission
Sets the light emission value of the block.- Parameters:
lightEmission- the light emission value to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
lightDampening
Sets the light dampening value of the block.- Parameters:
lightDampening- the light dampening value to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
transformation
Sets the transformation of the block.- Parameters:
transformation- the transformation to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
unitCube
Deprecated.Usegeometry(GeometryComponent)with `minecraft:geometry.full_block` instead.Sets the unit cube value, equivalent to setting a full block geometry.- See Also:
-
placeAir
Whether the block should place only air, overriding the default behavior.- Parameters:
placeAir- whether the block should place only air- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
tags
Sets the set of tags for the block.- Parameters:
tags- the set of tags to set- Returns:
- this builder
- Since:
- 2.2.0
- See Also:
-
build
CustomBlockComponents build()Builds these CustomBlockComponents.- Returns:
- the built CustomBlockComponents
- Since:
- 2.2.0
-
collisionBoxes(BoxComponent...)instead