Interface CustomItemBedrockOptions
public interface CustomItemBedrockOptions
This is used to store options for a custom item definition that can't be described using item components.
- Since:
- 2.9.3
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for custom item bedrock options. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf the item is allowed to be put into the offhand.builder()Creates a new builder for custom item bedrock options.@NonNull CreativeCategoryThe item's creative category.@Nullable StringThe item's creative group.booleanIf the item should be displayed as handheld, like a tool.@Nullable Stringicon()Gets the item's icon.intSince Bedrock doesn't properly support setting item armor values over attributes, this value determines how many armor points should be shown when this item is worn.@NonNull Set<Identifier> tags()Gets the item's set of bedrock tags that can be used in Molang.
-
Method Details
-
icon
@Nullable String icon()Gets the item's icon. When not present, the item's Bedrock identifier is used.- Returns:
- the item's icon
- Since:
- 2.9.3
- See Also:
-
allowOffhand
boolean allowOffhand()If the item is allowed to be put into the offhand. Defaults to true.- Returns:
- true if the item is allowed to be used in the offhand, false otherwise
- Since:
- 2.9.3
-
displayHandheld
boolean displayHandheld()If the item should be displayed as handheld, like a tool. Defaults to false.- Returns:
- true if the item should be displayed as handheld, false otherwise
- Since:
- 2.9.3
-
protectionValue
int protectionValue()Since Bedrock doesn't properly support setting item armor values over attributes, this value determines how many armor points should be shown when this item is worn. This is purely visual.Only has an effect when the item is equippable, and defaults to 0.
- Returns:
- the item's visually shown protection value
- Since:
- 2.9.3
-
creativeCategory
@NonNull CreativeCategory creativeCategory()The item's creative category. Defaults toNONE.- Returns:
- the item's creative category
- Since:
- 2.9.3
-
creativeGroup
@Nullable String creativeGroup()The item's creative group.A list of creative groups available in vanilla can be found here.
- Returns:
- the item's creative group
- Since:
- 2.9.3
-
tags
@NonNull Set<Identifier> tags()Gets the item's set of bedrock tags that can be used in Molang. Equivalent to "tag:some_tag"- Returns:
- the item's set of bedrock tags, can be empty
- Since:
- 2.9.3
-
builder
Creates a new builder for custom item bedrock options.- Returns:
- a new builder
- Since:
- 2.9.3
-