Class Content

All Implemented Interfaces:
Direct Known Subclasses:
BulletType, ErrorContent, MappableContent

public abstract class Content extends Object implements Comparable<Content>
Base class for a content type that is loaded in ContentLoader.
  • Field Details

    • id

      public short id
    • minfo

      public Content.ModContentInfo minfo
      Info on which mod this content was loaded from.
  • Constructor Details

    • Content

      public Content()
  • Method Details

    • getContentType

      public abstract ContentType getContentType()
      Returns the type name of this piece of content. This should return the same value for all instances of this content type.
    • init

      public void init()
      Called after all content and modules are created. Do not use to load regions or texture data!
    • load

      public void load()
      Called after all content is created, only on non-headless versions. Use for loading regions or other image data.
    • loadIcon

      public void loadIcon()
      Called right before load().
    • hasErrored

      public boolean hasErrored()
      whether an error occurred during mod loading.
    • isVanilla

      public boolean isVanilla()
      whether this is content from the base game.
    • isModded

      public boolean isModded()
      whether this content is from a mod.
    • compareTo

      public int compareTo(Content c)
      Specified by:
      compareTo in interface Comparable<Content>
    • toString

      public String toString()
      toString in class Object