Interface CustomItemData
- All Known Subinterfaces:
NonVanillaCustomItemData
public interface CustomItemData
This is used to store data for a custom item.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets if the item is allowed to be put into the offhand.static CustomItemData.Builderbuilder()Gets the custom item options of the item.@NonNull StringGets the item's display name.@NonNull Stringicon()Gets the item's icon.@NonNull Stringname()Gets the item's name.@Nullable CustomRenderOffsetsGets the item's render offsets.intGets the item's texture size.
-
Method Details
-
name
@NonNull String name()Gets the item's name.- Returns:
- the item's name
-
customItemOptions
CustomItemOptions customItemOptions()Gets the custom item options of the item.- Returns:
- the custom item options of the item.
-
displayName
@NonNull String displayName()Gets the item's display name. By default, this is the item's name.- Returns:
- the item's display name
-
icon
@NonNull String icon()Gets the item's icon. By default, this is the item's name.- Returns:
- the item's icon
-
allowOffhand
boolean allowOffhand()Gets if the item is allowed to be put into the offhand.- Returns:
- true if the item is allowed to be used in the offhand, false otherwise
-
textureSize
int textureSize()Gets the item's texture size. This is to resize the item if the texture is not 16x16.- Returns:
- the item's texture size
-
renderOffsets
@Nullable CustomRenderOffsets renderOffsets()Gets the item's render offsets. If it is null, the item will be rendered normally, with no offsets.- Returns:
- the item's render offsets
-
builder
-