Interface CustomBlockComponents
public interface CustomBlockComponents
This class is used to store components for a custom block or custom block permutation.
- Since:
- 2.2.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a Builder for CustomBlockComponents@Nullable BoxComponentDeprecated.Gets the collision boxes component.@Nullable FloatGets the destructible by mining component Equivalent to "minecraft:destructible_by_mining"@Nullable StringGets the display name component.@Nullable Floatfriction()Gets the friction component Equivalent to "minecraft:friction"@Nullable GeometryComponentgeometry()Gets the geometry component.@Nullable IntegerGets the light dampening component Equivalent to "minecraft:light_dampening"@Nullable IntegerGets the light emission component Equivalent to "minecraft:light_emission"Gets the material instances component Equivalent to "minecraft:material_instances"booleanplaceAir()Gets if the block should place only air Equivalent to setting a dummy event to run on "minecraft:on_player_placing"@Nullable List<PlacementConditions> Gets the placement filter component Equivalent to "minecraft:placement_filter"@Nullable BoxComponentGets the selection box component Equivalent to "minecraft:selection_box"tags()Gets the set of tags Equivalent to "tag:some_tag"@Nullable TransformationComponentGets the transformation component Equivalent to "minecraft:transformation"booleanunitCube()Deprecated.Usegeometry()and compare with `minecraft:geometry.full_block` instead.
-
Method Details
-
selectionBox
@Nullable BoxComponent selectionBox()Gets the selection box component Equivalent to "minecraft:selection_box"- Returns:
- the selection box
- Since:
- 2.2.0
-
collisionBox
Deprecated.UsecollisionBoxes()insteadGets the collision box component Equivalent to "minecraft:collision_box"- Returns:
- the collision box
- Since:
- 2.2.0
-
collisionBoxes
Set<BoxComponent> collisionBoxes()Gets the collision boxes component. Equivalent to "minecraft:collision_box", which can be either one, none, or up to 16 collision boxes.- Returns:
- the collision boxes
- Since:
- 2.9.5
-
displayName
@Nullable String displayName()Gets the display name component. Equivalent to "minecraft:display_name"- Returns:
- the display name
- Since:
- 2.2.0
-
geometry
@Nullable GeometryComponent geometry()Gets the geometry component. Equivalent to "minecraft:geometry"- Returns:
- the geometry
- Since:
- 2.2.0
-
materialInstances
Map<String,MaterialInstance> materialInstances()Gets the material instances component Equivalent to "minecraft:material_instances"- Returns:
- the material instances
- Since:
- 2.2.0
-
placementFilter
@Nullable List<PlacementConditions> placementFilter()Gets the placement filter component Equivalent to "minecraft:placement_filter"- Returns:
- the placement filter
- Since:
- 2.2.0
-
destructibleByMining
@Nullable Float destructibleByMining()Gets the destructible by mining component Equivalent to "minecraft:destructible_by_mining"- Returns:
- the destructible by mining value
- Since:
- 2.2.0
-
friction
@Nullable Float friction()Gets the friction component Equivalent to "minecraft:friction"- Returns:
- the friction value
- Since:
- 2.2.0
-
lightEmission
@Nullable Integer lightEmission()Gets the light emission component Equivalent to "minecraft:light_emission"- Returns:
- the light emission value
- Since:
- 2.2.0
-
lightDampening
@Nullable Integer lightDampening()Gets the light dampening component Equivalent to "minecraft:light_dampening"- Returns:
- the light dampening value
- Since:
- 2.2.0
-
transformation
@Nullable TransformationComponent transformation()Gets the transformation component Equivalent to "minecraft:transformation"- Returns:
- the transformation
- Since:
- 2.2.0
-
unitCube
Deprecated.Usegeometry()and compare with `minecraft:geometry.full_block` instead.Gets the unit cube component Equivalent to "minecraft:unit_cube"- Returns:
- whether this block is a unit cube
- Since:
- 2.2.0
-
placeAir
boolean placeAir()Gets if the block should place only air Equivalent to setting a dummy event to run on "minecraft:on_player_placing"- Returns:
- if the block should place only air
- Since:
- 2.2.0
-
tags
Gets the set of tags Equivalent to "tag:some_tag"- Returns:
- the set of tags
- Since:
- 2.2.0
-
builder
Create a Builder for CustomBlockComponents- Returns:
- a
CustomBlockComponents.Builder - Since:
- 2.2.0
-
collisionBoxes()instead