Package net.risingworld.api.definitions
Klasse Items.ItemDefinition
java.lang.Object
net.risingworld.api.definitions.Items.ItemDefinition
- Umschließende Klasse:
Items
-
Verschachtelte Klassen - Übersicht
-
Feldübersicht
Modifizierer und TypFeldBeschreibungItem break sound.boolean
Gets whether or not this item can have a modifierboolean
Determines whether of not this item can swim in waterItem category (e.g tool, medical, weapon etc)Item collide sound.boolean
Determines whether this item requires a collision listener (if spawned as world item)Consume info for this item.boolean
If true, this item has a custom icon which is generated at runtimefloat
Mass for debrisshort
Initial status for new items.float
Initial value for new items.boolean
If true, item will be destroyed when being dropped (i.e it does not spawn a world item)int
Item durability (number of uses before it breaks).Extent / size of the itemItem group flagsDetermines in which hand this item is being held (0 == left, 1 == right, 2 == none).Item hit sound.short
Internal ID of the itemAll item infos related to this item.float
Item massItem material (i.e the material this item consists of, e.g stone, metal, wood etc)short
Max status for items.float
Max value for items.Name of the itemboolean
Determines whether the item action is performed if held by a (hostile) npc, or if the npc performs a generic punch when attacking the playerPicking info for this item.Optional other item that gets added to the inventory when picking up this item.Item place sound.Item model offset when holding in handsOptional offset when rendering the item (e.g as custom icon or for crafting preview)Optional rotation when rendering the item (e.g as custom icon or for crafting preview)boolean
If true, the item status will be set to 0 when dropping this itemboolean
If true, the item value will be set to 0 when dropping this itemItem model rotation when holding in handsfloat
Item model size (default: 1.0f)short
Max stack size for this itemshort
Item strength / hit pointsboolean
Determines if this item is two-handed, i.e held by both handsItem typeArray containing all item variants.int
Number of item variants (see variants array). -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetIcon
(int texture) Gets the ingame icon of this item as TextureAsset.getVariant
(int variant) Gets a item variant.void
-
Felddetails
-
id
public short idInternal ID of the item -
name
Name of the item -
type
Item type -
group
Item group flags -
variations
public int variationsNumber of item variants (see variants array). 0 means there are no additional variants available (only the default variant), 1 means there are two variants (default and 1) etc -
hand
Determines in which hand this item is being held (0 == left, 1 == right, 2 == none). Basically this just determines which hand the game object gets attached to -
twohanded
public boolean twohandedDetermines if this item is two-handed, i.e held by both hands -
position
Item model offset when holding in hands -
rotation
Item model rotation when holding in hands -
pickupitem
Optional other item that gets added to the inventory when picking up this item. Null by default -
size
public float sizeItem model size (default: 1.0f) -
stacksize
public short stacksizeMax stack size for this item -
material
Item material (i.e the material this item consists of, e.g stone, metal, wood etc) -
extent
Extent / size of the item -
category
Item category (e.g tool, medical, weapon etc) -
strength
public short strengthItem strength / hit points -
durability
public int durabilityItem durability (number of uses before it breaks). -1 == infinite -
mass
public float massItem mass -
debrismass
public float debrismassMass for debris -
collisionlistener
public boolean collisionlistenerDetermines whether this item requires a collision listener (if spawned as world item) -
canhavemodifier
public boolean canhavemodifierGets whether or not this item can have a modifier -
canswim
public boolean canswimDetermines whether of not this item can swim in water -
npcaction
public boolean npcactionDetermines whether the item action is performed if held by a (hostile) npc, or if the npc performs a generic punch when attacking the player -
defaultstatus
public short defaultstatusInitial status for new items. Default: 0 -
defaultvalue
public float defaultvalueInitial value for new items. Default: 0.0 -
maxstatus
public short maxstatusMax status for items. Default: 0 -
maxvalue
public float maxvalueMax value for items. Default: 0.0 -
resetstatusondrop
public boolean resetstatusondropIf true, the item status will be set to 0 when dropping this item -
resetvalueondrop
public boolean resetvalueondropIf true, the item value will be set to 0 when dropping this item -
destroyondrop
public boolean destroyondropIf true, item will be destroyed when being dropped (i.e it does not spawn a world item) -
customicon
public boolean customiconIf true, this item has a custom icon which is generated at runtime -
renderoffset
Optional offset when rendering the item (e.g as custom icon or for crafting preview) -
renderrotation
Optional rotation when rendering the item (e.g as custom icon or for crafting preview) -
hitsound
Item hit sound. May be null -
breaksound
Item break sound. May be null -
collidesound
Item collide sound. May be null -
placesound
Item place sound. May be null -
pickingInfo
Picking info for this item. May be null -
itemInfos
All item infos related to this item. May be null -
consumeInfo
Consume info for this item. May be null -
variants
Array containing all item variants. Variant 0 is always the default variant. Never null and always has a minimum size of 1
-
-
Methodendetails
-
synchronize
public void synchronize() -
getVariant
Gets a item variant.- Parameter:
variant
- the variant. The default variant is always 0. The value is clamped automatically.- Gibt zurück:
- the item variant.
-
getIcon
Gets the ingame icon of this item as TextureAsset.- Parameter:
texture
- the item texture/variant. By default 0.- Gibt zurück:
- the icon of this item.
-