Class Items.ItemDefinition

java.lang.Object
net.risingworld.api.definitions.Items.ItemDefinition
Enclosing class:
Items

public final class Items.ItemDefinition extends Object
  • Field Details

    • id

      public short id
      Internal ID of the item
    • name

      public String name
      Name of the item
    • type

      public Items.Type type
      Item type
    • group

      public Items.Group group
      Item group flags
    • variations

      public int variations
      Number 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

      public Items.Hand 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 twohanded
      Determines if this item is two-handed, i.e held by both hands
    • position

      public Vector3f position
      Item model offset when holding in hands
    • rotation

      public Quaternion rotation
      Item model rotation when holding in hands
    • size

      public float size
      Item model size (default: 1.0f)
    • stacksize

      public short stacksize
      Max stack size for this item
    • material

      public Items.Material material
      Item material (i.e the material this item consists of, e.g stone, metal, wood etc)
    • extent

      public Items.Size extent
      Extent / size of the item
    • category

      public Items.Category category
      Item category (e.g tool, medical, weapon etc)
    • strength

      public short strength
      Item strength / hit points
    • durability

      public int durability
      Item durability (number of uses before it breaks). -1 == infinite
    • mass

      public float mass
      Item mass
    • debrismass

      public float debrismass
      Mass for debris
    • collisionlistener

      public boolean collisionlistener
      Determines whether this item requires a collision listener (if spawned as world item)
    • canhavemodifier

      public boolean canhavemodifier
      Gets whether or not this item can have a modifier
    • canswim

      public boolean canswim
      Determines whether of not this item can swim in water
    • defaultstatus

      public short defaultstatus
      Initial status for new items. Default: 0
    • defaultvalue

      public float defaultvalue
      Initial value for new items. Default: 0.0
    • maxstatus

      public short maxstatus
      Max status for items. Default: 0
    • maxvalue

      public float maxvalue
      Max value for items. Default: 0.0
    • resetstatusondrop

      public boolean resetstatusondrop
      If true, the item status will be set to 0 when dropping this item
    • resetvalueondrop

      public boolean resetvalueondrop
      If true, the item value will be set to 0 when dropping this item
    • destroyondrop

      public boolean destroyondrop
      If true, item will be destroyed when being dropped (i.e it does not spawn a world item)
    • customicon

      public boolean customicon
      If true, this item has a custom icon which is generated at runtime
    • renderoffset

      public Vector3f renderoffset
      Optional offset when rendering the item (e.g as custom icon or for crafting preview)
    • renderrotation

      public Quaternion renderrotation
      Optional rotation when rendering the item (e.g as custom icon or for crafting preview)
    • hitsound

      public String hitsound
      Item hit sound. May be null
    • breaksound

      public String breaksound
      Item break sound. May be null
    • collidesound

      public String collidesound
      Item collide sound. May be null
    • placesound

      public String placesound
      Item place sound. May be null
    • pickingInfo

      public Items.PickingInfo pickingInfo
      Picking info for this item. May be null
    • itemInfos

      public Items.ItemInfo[] itemInfos
      All item infos related to this item. May be null
    • consumeInfo

      public Items.ConsumeInfo consumeInfo
      Consume info for this item. May be null
    • variants

      public Items.ItemDefinition.Variant[] variants
      Array containing all item variants. Variant 0 is always the default variant. Never null and always has a minimum size of 1
  • Method Details

    • synchronize

      public void synchronize()