Interface NonVanillaCustomItemData
- All Superinterfaces:
CustomItemData
Represents a completely custom item that is not based on an existing vanilla Minecraft item.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable StringGets the armor type of the item.intGets the attack damage of the item.block()Gets the block the item places.builder()booleanGets if the food item can always be eaten.@NonNull StringGets the java identifier for this item.booleanGets if the item is chargable, like a bow.booleanisEdible()Gets if the item is edible.booleanisFoil()Gets if the item is a foil.booleanisHat()Gets if the item is a hat.default booleanisTool()Deprecated.@org.checkerframework.checker.index.qual.NonNegative intjavaId()Gets the java item id of the item.intGets the max damage of the item.intGets the armor protection value of the item.Gets the repair materials of the item.@org.checkerframework.checker.index.qual.NonNegative intGets the stack size of the item.@Nullable StringtoolTier()Gets the tool tier of the item.@Nullable StringtoolType()Gets the tool type of the item.@Nullable StringGets the item's translation string.Methods inherited from interface org.geysermc.geyser.api.item.custom.CustomItemData
allowOffhand, creativeCategory, creativeGroup, customItemOptions, displayHandheld, displayName, icon, name, renderOffsets, tags, textureSize
-
Method Details
-
identifier
@NonNull String identifier()Gets the java identifier for this item.- Returns:
- The java identifier for this item.
-
javaId
@org.checkerframework.checker.index.qual.NonNegative int javaId()Gets the java item id of the item.- Returns:
- the java item id of the item
-
stackSize
@org.checkerframework.checker.index.qual.NonNegative int stackSize()Gets the stack size of the item.- Returns:
- the stack size of the item
-
maxDamage
int maxDamage()Gets the max damage of the item.- Returns:
- the max damage of the item
-
attackDamage
int attackDamage()Gets the attack damage of the item. This is purely visual, and only applied to tools- Returns:
- the attack damage of the item
-
toolType
@Nullable String toolType()Gets the tool type of the item.- Returns:
- the tool type of the item
-
toolTier
@Nullable String toolTier()Gets the tool tier of the item.- Returns:
- the tool tier of the item
-
armorType
@Nullable String armorType()Gets the armor type of the item.- Returns:
- the armor type of the item
-
protectionValue
int protectionValue()Gets the armor protection value of the item.- Returns:
- the armor protection value of the item
-
translationString
@Nullable String translationString()Gets the item's translation string.- Returns:
- the item's translation string
-
repairMaterials
Gets the repair materials of the item.- Returns:
- the repair materials of the item
-
isHat
boolean isHat()Gets if the item is a hat. This is used to determine if the item should be rendered on the player's head, and normally allow the player to equip it. This is not meant for armor.- Returns:
- if the item is a hat
-
isFoil
boolean isFoil()Gets if the item is a foil. This is used to determine if the item should be rendered with an enchantment glint effect.- Returns:
- if the item is a foil
-
isEdible
boolean isEdible()Gets if the item is edible.- Returns:
- if the item is edible
-
canAlwaysEat
boolean canAlwaysEat()Gets if the food item can always be eaten.- Returns:
- if the item is allowed to be eaten all the time
-
isChargeable
boolean isChargeable()Gets if the item is chargable, like a bow.- Returns:
- if the item should act like a chargable item
-
isTool
Deprecated.UseCustomItemData.displayHandheld()instead. Gets if the item is a tool. This is used to set the render type of the item, if the item is handheld.- Returns:
- if the item is a tool
-
block
String block()Gets the block the item places.- Returns:
- the block the item places
-
builder
-
CustomItemData.displayHandheld()instead.