Class Item

All Implemented Interfaces:
Comparable<Content>, Senseable

public class Item extends UnlockableContent implements Senseable
  • Field Details

    • color

      public Color color
    • explosiveness

      public float explosiveness
      how explosive this item is.
    • flammability

      public float flammability
      flammability above 0.3 makes this eligible for item burners.
    • radioactivity

      public float radioactivity
      how radioactive this item is.
    • charge

      public float charge
      how electrically potent this item is.
    • hardness

      public int hardness
      drill hardness of the item
    • cost

      public float cost
      base material cost of this item, used for calculating place times 1 cost = 1 tick added to build time
    • healthScaling

      public float healthScaling
      When this item is present in the build cost, a block's default health is multiplied by 1 + scaling, where 'scaling' is summed together for all item requirement types.
    • lowPriority

      public boolean lowPriority
      if true, this item is of the lowest priority to drills.
    • frames

      public int frames
      If >0, this item is animated.
    • transitionFrames

      public int transitionFrames
      Number of generated transition frames between each frame
    • frameTime

      public float frameTime
      Ticks in-between animation frames.
    • buildable

      public boolean buildable
      If true, this material is used by buildings. If false, this material will be incinerated in certain cores.
    • hidden

      public boolean hidden
    • hiddenOnPlanets

      @Nullable public Planet[] hiddenOnPlanets
      For mods. Adds this item to the listed planets' hidden items Seq.
  • Constructor Details

  • Method Details

    • init

      public void init()
      Description copied from class: Content
      Called after all content and modules are created. Do not use to load regions or texture data!
      Overrides:
      init in class Content
    • isHidden

      public boolean isHidden()
      Description copied from class: UnlockableContent
      Whether this content is always hidden in the content database dialog.
      Overrides:
      isHidden in class UnlockableContent
    • loadIcon

      public void loadIcon()
      Description copied from class: Content
      Called right before load().
      Overrides:
      loadIcon in class UnlockableContent
    • setStats

      public void setStats()
      Description copied from class: UnlockableContent
      Initializes stats on demand. Should only be called once. Only called before something is displayed.
      Overrides:
      setStats in class UnlockableContent
    • toString

      public String toString()
      Overrides:
      toString in class MappableContent
    • getContentType

      public ContentType getContentType()
      Description copied from class: Content
      Returns the type name of this piece of content. This should return the same value for all instances of this content type.
      Specified by:
      getContentType in class Content
    • createIcons

      public void createIcons(MultiPacker packer)
      Description copied from class: UnlockableContent
      Generate any special icons for this content. Called synchronously. No regions are loaded at this point; grab pixmaps from the packer.
      Overrides:
      createIcons in class UnlockableContent
    • sense

      public double sense(LAccess sensor)
      Specified by:
      sense in interface Senseable
    • senseObject

      public Object senseObject(LAccess sensor)
      Specified by:
      senseObject in interface Senseable
    • getAllOres

      public static Seq<Item> getAllOres()
      Allocates a new array containing all items that generate ores.