Interface CustomItemBedrockOptions.Builder
- Enclosing interface:
CustomItemBedrockOptions
public static interface CustomItemBedrockOptions.Builder
Builder for custom item bedrock options.
- Since:
- 2.9.3
-
Method Summary
Modifier and TypeMethodDescriptionallowOffhand(boolean allowOffhand) Sets if the item is allowed to be put into the offhand.build()Creates the custom item bedrock options.creativeCategory(CreativeCategory creativeCategory) Sets the item's creative category.creativeGroup(@Nullable String creativeGroup) Sets the item's creative group.displayHandheld(boolean displayHandheld) Sets if the item should be displayed as handheld, like a tool.dyeable(@org.checkerframework.common.value.qual.IntRange(from=0L, to=16777215L) int defaultColor) Marks the item as dyeable, and sets the default color of the item.default CustomItemBedrockOptions.Builderdyeable(@org.checkerframework.common.value.qual.IntRange(from=0L, to=255L) int defaultRed, @org.checkerframework.common.value.qual.IntRange(from=0L, to=255L) int defaultGreen, @org.checkerframework.common.value.qual.IntRange(from=0L, to=255L) int defaultBlue) Marks the item as dyeable, and sets the default color of the item.default CustomItemBedrockOptions.BuilderMarks the item as dyeable, and sets the default color of the item.default CustomItemBedrockOptions.BuilderShorthand method for setting the item's default icon.iconData(CustomItemIcons iconData) Sets this item's icon data.default CustomItemBedrockOptions.BuildericonData(CustomItemIcons.Builder builder) Shorthand method foriconData(CustomItemIcons), sets this item's icon data.protectionValue(@org.checkerframework.checker.index.qual.NonNegative int protectionValue) Sets the item's protection value.tag(Identifier tag) Adds a tag to the set of bedrock tags this item has, for use in Molang.tags(@Nullable Set<Identifier> tags) Sets the item's set of bedrock tags, for use in Molang.
-
Method Details
-
icon
Shorthand method for setting the item's default icon.This will clear the item's dyeable icon, if it was set.
- Parameters:
icon- the item's default icon- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
iconData
Shorthand method foriconData(CustomItemIcons), sets this item's icon data.- Parameters:
builder- theCustomItemIcons.Builderinstance- Returns:
- this builder
- Since:
- 2.12.0
- See Also:
-
iconData
Sets this item's icon data.- Parameters:
iconData- theCustomItemIconsinstance- Returns:
- this builder
- Since:
- 2.12.0
- See Also:
-
allowOffhand
Sets if the item is allowed to be put into the offhand.- Parameters:
allowOffhand- if the item is allowed to be put into the offhand slot- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
displayHandheld
Sets if the item should be displayed as handheld, like a tool.- Parameters:
displayHandheld- if the item should be displayed as handheld- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
protectionValue
CustomItemBedrockOptions.Builder protectionValue(@org.checkerframework.checker.index.qual.NonNegative int protectionValue) Sets the item's protection value.- Parameters:
protectionValue- the item's protection value- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
creativeCategory
Sets the item's creative category.- Parameters:
creativeCategory- the item's creative category- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
creativeGroup
Sets the item's creative group.- Parameters:
creativeGroup- the item's creative group- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
tag
Adds a tag to the set of bedrock tags this item has, for use in Molang.- Parameters:
tag- the tag to be added- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
tags
Sets the item's set of bedrock tags, for use in Molang. Passnullto clear all tags.- Parameters:
tags- the tags to be set, ornullto clear all tags- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
dyeable
CustomItemBedrockOptions.Builder dyeable(@org.checkerframework.common.value.qual.IntRange(from=0L, to=16777215L) int defaultColor) Marks the item as dyeable, and sets the default color of the item.- Parameters:
defaultColor- the default color of the item- Returns:
- this builder
- Since:
- 2.12.0
- See Also:
-
dyeable
default CustomItemBedrockOptions.Builder dyeable(@org.checkerframework.common.value.qual.IntRange(from=0L, to=255L) int defaultRed, @org.checkerframework.common.value.qual.IntRange(from=0L, to=255L) int defaultGreen, @org.checkerframework.common.value.qual.IntRange(from=0L, to=255L) int defaultBlue) Marks the item as dyeable, and sets the default color of the item.- Parameters:
defaultRed- the red component of the default color of the itemdefaultGreen- the green component of the default color of the itemdefaultBlue- the blue component of the default color of the item- Returns:
- this builder
- Since:
- 2.12.0
- See Also:
-
dyeable
Marks the item as dyeable, and sets the default color of the item.- Parameters:
defaultColor- the default color of the item- Returns:
- this builder
- Since:
- 2.12.0
-
build
CustomItemBedrockOptions build()Creates the custom item bedrock options.- Returns:
- the new instance of bedrock options
- Throws:
IllegalStateException- when the setCustomItemIconshas a dyeable icon, but the item is not marked as dyeable- Since:
- 2.9.3
-