@ParametersAreNonnullByDefault public abstract class Displayable extends java.lang.Object implements java.lang.Comparable<Displayable>
| Modifier and Type | Field and Description |
|---|---|
protected DisplayType |
displayType |
protected java.lang.String |
id |
protected java.lang.String |
modId |
| Modifier | Constructor and Description |
|---|---|
protected |
Displayable(java.lang.String modId)
Constructor with explicit display id.
|
| Modifier and Type | Method and Description |
|---|---|
static float |
clampOpacity(float opacity)
Clamps an rgb int value to the allowable range of 0F-1F.
|
static int |
clampRGB(int rgb)
Clamps an rgb int value to the allowable range.
|
int |
compareTo(Displayable o)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object o)
Equality is based on either reference equality or GUID.
|
abstract int |
getDisplayOrder()
Used to determine display order, lower first.
|
DisplayType |
getDisplayType()
DisplayType enum for the object.
|
java.lang.String |
getGuid()
Dash-delimited GUID for the display object in the form of "modid-displayType-displayId".
|
java.lang.String |
getId()
A unique id for the object.
|
java.lang.String |
getModId()
Your mod id.
|
int |
hashCode() |
@Since(value=1.1) protected final java.lang.String modId
@Since(value=1.1) protected final java.lang.String id
@Since(value=1.1) protected final DisplayType displayType
protected Displayable(java.lang.String modId)
modId - the mod idpublic static int clampRGB(int rgb)
rgb - colorpublic static float clampOpacity(float opacity)
opacity - opacitypublic abstract int getDisplayOrder()
public final java.lang.String getModId()
public final java.lang.String getId()
public final DisplayType getDisplayType()
public final java.lang.String getGuid()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - otherpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(Displayable o)
compareTo in interface java.lang.Comparable<Displayable>o - the object to be compared.java.lang.NullPointerException - if the specified object is nulljava.lang.ClassCastException - if the specified object's type prevents it
from being compared to this object.