Package noppes.npcs.api.item
Interface IItemCustom
-
- All Superinterfaces:
IItemStack
public interface IItemCustom extends IItemStack
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getArmorType()
Gets the armor type for the scripted item.int
getColor()
Gets the color of the scripted item.int
getDigSpeed()
Gets the dig speed for the scripted item.int
getDurabilityColor()
Gets the color of the durability bar for the scripted item.boolean
getDurabilityShow()
Checks if the durability bar should be shown for the scripted item.double
getDurabilityValue()
Gets the current durability value for the scripted item.boolean
getEnabled()
int
getEnchantability()
Gets the enchantability for the scripted item.int
getItemUseAction()
Gets the item use action for the scripted item.int
getMaxItemUseDuration()
Gets the maximum item use duration for the scripted item.float
getRotationX()
Gets the X-axis rotation for the scripted item.float
getRotationXRate()
Gets the X-axis rotation rate for the scripted item.float
getRotationY()
Gets the Y-axis rotation for the scripted item.float
getRotationYRate()
Gets the Y-axis rotation rate for the scripted item.float
getRotationZ()
Gets the Z-axis rotation for the scripted item.float
getRotationZRate()
Gets the Z-axis rotation rate for the scripted item.float
getScaleX()
Gets the X-axis scale for the scripted item.float
getScaleY()
Gets the Y-axis scale for the scripted item.float
getScaleZ()
Gets the Z-axis scale for the scripted item.java.lang.String
getTexture()
Gets the texture path for the scripted item.float
getTranslateX()
Gets the X-axis translation for the scripted item.float
getTranslateY()
Gets the Y-axis translation for the scripted item.float
getTranslateZ()
Gets the Z-axis translation for the scripted item.boolean
isNormalItem()
Checks if the scripted item is a normal item.boolean
isTool()
Checks if the scripted item is a tool.void
setArmorType(int armorType)
Sets the armor type for the scripted item.void
setColor(int color)
Sets the color of the scripted item.void
setDigSpeed(int digSpeed)
Sets the dig speed for the scripted item.void
setDurabilityColor(int durabilityColor)
Sets the color of the durability bar for the scripted item.void
setDurabilityShow(boolean durabilityShow)
Sets whether the durability bar should be shown for the scripted item.void
setDurabilityValue(float durabilityValue)
Sets the current durability value for the scripted item.void
setEnabled(boolean enable)
void
setEnchantability(int enchantability)
Sets the enchantability for the scripted item.void
setIsNormalItem(boolean normalItem)
Sets whether the scripted item is a normal item.void
setIsTool(boolean isTool)
Sets whether the scripted item is a tool.void
setItemUseAction(int action)
Sets the item use action for the scripted item.void
setMaxItemUseDuration(int duration)
Sets the maximum item use duration for the scripted item.void
setMaxStackSize(int maxStackSize)
Sets the maximum stack size for the scripted item.void
setRotation(float rotationX, float rotationY, float rotationZ)
Sets the rotation values for the scripted item.void
setRotationRate(float rotationXRate, float rotationYRate, float rotationZRate)
Sets the rotation rate values for the scripted item.void
setScale(float scaleX, float scaleY, float scaleZ)
Sets the scale values for the scripted item.void
setTexture(java.lang.String texture)
Sets the texture path for the scripted item.void
setTranslate(float translateX, float translateY, float translateZ)
Sets the translation values for the scripted item.-
Methods inherited from interface noppes.npcs.api.item.IItemStack
addEnchant, getAttribute, getBookAuthor, getBookText, getBookTitle, getDisplayName, getItemDamage, getItemName, getItemNbt, getLore, getMaxStackSize, getMCItemStack, getMCNbt, getName, getNbt, getStackSize, getTag, hasAttribute, hasCustomName, hasEnchant, hasLore, hasTag, isBlock, isEnchanted, isWrittenBook, itemHash, removeTags, setAttribute, setCustomName, setItemDamage, setLore, setMCNbt, setStackSize, setTag
-
-
-
-
Method Detail
-
getEnabled
boolean getEnabled()
- Returns:
- true if scripted item script is enabled
-
setEnabled
void setEnabled(boolean enable)
- Parameters:
enable
- Enable or Disable scripted item script
-
getTexture
java.lang.String getTexture()
Gets the texture path for the scripted item.- Returns:
- The texture path
-
setTexture
void setTexture(java.lang.String texture)
Sets the texture path for the scripted item. Can be a URL- Parameters:
texture
- The texture path
-
setArmorType
void setArmorType(int armorType)
Sets the armor type for the scripted item.- Parameters:
armorType
- The armor type
-
getArmorType
int getArmorType()
Gets the armor type for the scripted item.- Returns:
- The armor type
-
setIsTool
void setIsTool(boolean isTool)
Sets whether the scripted item is a tool.- Parameters:
isTool
- True if the item is a tool, false otherwise
-
isTool
boolean isTool()
Checks if the scripted item is a tool. Allows for enchanting- Returns:
- True if the item is a tool, false otherwise
-
setIsNormalItem
void setIsNormalItem(boolean normalItem)
Sets whether the scripted item is a normal item. Will disable all forms of Rotation, Translation, Scale Rendering in hand and on ground- Parameters:
normalItem
- True if the item is a normal item, false otherwise
-
isNormalItem
boolean isNormalItem()
Checks if the scripted item is a normal item.- Returns:
- True if the item is a normal item, false otherwise
-
setDigSpeed
void setDigSpeed(int digSpeed)
Sets the dig speed for the scripted item.- Parameters:
digSpeed
- The dig speed
-
getDigSpeed
int getDigSpeed()
Gets the dig speed for the scripted item.- Returns:
- The dig speed
-
setMaxStackSize
void setMaxStackSize(int maxStackSize)
Sets the maximum stack size for the scripted item.- Parameters:
maxStackSize
- The maximum stack size
-
getDurabilityValue
double getDurabilityValue()
Gets the current durability value for the scripted item.- Returns:
- The durability value
-
setDurabilityValue
void setDurabilityValue(float durabilityValue)
Sets the current durability value for the scripted item.- Parameters:
durabilityValue
- The durability value
-
getDurabilityShow
boolean getDurabilityShow()
Checks if the durability bar should be shown for the scripted item.- Returns:
- True if the durability bar should be shown, false otherwise
-
setDurabilityShow
void setDurabilityShow(boolean durabilityShow)
Sets whether the durability bar should be shown for the scripted item.- Parameters:
durabilityShow
- True if the durability bar should be shown, false otherwise
-
getDurabilityColor
int getDurabilityColor()
Gets the color of the durability bar for the scripted item.- Returns:
- The durability bar color
-
setDurabilityColor
void setDurabilityColor(int durabilityColor)
Sets the color of the durability bar for the scripted item.- Parameters:
durabilityColor
- The durability bar color
-
getColor
int getColor()
Gets the color of the scripted item.- Returns:
- The item color
-
setColor
void setColor(int color)
Sets the color of the scripted item.- Parameters:
color
- The item color
-
getMaxItemUseDuration
int getMaxItemUseDuration()
Gets the maximum item use duration for the scripted item.- Returns:
- The maximum item use duration
-
setMaxItemUseDuration
void setMaxItemUseDuration(int duration)
Sets the maximum item use duration for the scripted item.- Parameters:
duration
- The maximum item use duration
-
setItemUseAction
void setItemUseAction(int action)
Sets the item use action for the scripted item.- Parameters:
action
- The item use action
-
getItemUseAction
int getItemUseAction()
Gets the item use action for the scripted item.- Returns:
- The item use action
-
getEnchantability
int getEnchantability()
Gets the enchantability for the scripted item.- Returns:
- The enchantability
-
setEnchantability
void setEnchantability(int enchantability)
Sets the enchantability for the scripted item.- Parameters:
enchantability
- The enchantability
-
setRotation
void setRotation(float rotationX, float rotationY, float rotationZ)
Sets the rotation values for the scripted item.- Parameters:
rotationX
- The X-axis rotationrotationY
- The Y-axis rotationrotationZ
- The Z-axis rotation
-
setRotationRate
void setRotationRate(float rotationXRate, float rotationYRate, float rotationZRate)
Sets the rotation rate values for the scripted item. Spinning Speed- Parameters:
rotationXRate
- The X-axis rotation raterotationYRate
- The Y-axis rotation raterotationZRate
- The Z-axis rotation rate
-
setScale
void setScale(float scaleX, float scaleY, float scaleZ)
Sets the scale values for the scripted item.- Parameters:
scaleX
- The X-axis scalescaleY
- The Y-axis scalescaleZ
- The Z-axis scale
-
setTranslate
void setTranslate(float translateX, float translateY, float translateZ)
Sets the translation values for the scripted item.- Parameters:
translateX
- The X-axis translationtranslateY
- The Y-axis translationtranslateZ
- The Z-axis translation
-
getRotationX
float getRotationX()
Gets the X-axis rotation for the scripted item.- Returns:
- The X-axis rotation
-
getRotationY
float getRotationY()
Gets the Y-axis rotation for the scripted item.- Returns:
- The Y-axis rotation
-
getRotationZ
float getRotationZ()
Gets the Z-axis rotation for the scripted item.- Returns:
- The Z-axis rotation
-
getRotationXRate
float getRotationXRate()
Gets the X-axis rotation rate for the scripted item.- Returns:
- The X-axis rotation rate
-
getRotationYRate
float getRotationYRate()
Gets the Y-axis rotation rate for the scripted item.- Returns:
- The Y-axis rotation rate
-
getRotationZRate
float getRotationZRate()
Gets the Z-axis rotation rate for the scripted item.- Returns:
- The Z-axis rotation rate
-
getScaleX
float getScaleX()
Gets the X-axis scale for the scripted item.- Returns:
- The X-axis scale
-
getScaleY
float getScaleY()
Gets the Y-axis scale for the scripted item.- Returns:
- The Y-axis scale
-
getScaleZ
float getScaleZ()
Gets the Z-axis scale for the scripted item.- Returns:
- The Z-axis scale
-
getTranslateX
float getTranslateX()
Gets the X-axis translation for the scripted item.- Returns:
- The X-axis translation
-
getTranslateY
float getTranslateY()
Gets the Y-axis translation for the scripted item.- Returns:
- The Y-axis translation
-
getTranslateZ
float getTranslateZ()
Gets the Z-axis translation for the scripted item.- Returns:
- The Z-axis translation
-
-