public interface Archetype<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends BaseObject<G,A,R,R>
GameObject
to Archetype
and see what breaks. Then all method signatures are copied to this interface.
Once that is done we technically know what an Archetype is and can create a
class for it. Once the Archetype classes are finished, GameObject will no
longer implement Archetype and we've separated Archetype from GameObject.ANIM_SPEED, ANIMATION, BLOCKSVIEW, DIRECTION, EDIT_TYPE_NONE, FACE, HP, IS_ANIMATED, IS_TURNABLE, LAST_HEAL, LEVEL, NAME, NO_PASS, NO_PICK, SLAYING, SP, TITLE, TYPE
Modifier and Type | Method and Description |
---|---|
void |
addFirst(G gameObject)
Adds the given
GameObject at the beginning of this Container. |
void |
addLast(G gameObject)
Adds the given
GameObject at the end of this Container. |
@NotNull java.lang.String |
getArchetypeName()
Returns the name of this archetype.
|
@NotNull java.util.Collection<java.lang.String> |
getAttributeKeys()
Returns all attribute keys of this archetype.
|
@Nullable java.lang.String |
getEditorFolder()
Returns the editor folder.
|
int |
getMultiPartNr()
Returns the multi part id.
|
int |
getMultiShapeID()
Returns the multi shape id.
|
int |
getMultiX()
Returns the x-distance of this part to the head part.
|
int |
getMultiY()
Returns the y-distance of this part to the head part.
|
boolean |
isArtifact()
Returns whether this GameObject is an Artifact.
|
boolean |
isLowestPart()
Returns whether this part has the smallest y coordinate when painting the
image.
|
boolean |
isUndefinedArchetype()
Return whether this archetype denotes an undefined archetype.
|
@NotNull java.util.Iterator<G> |
iterator()
Returns all inventory objects.
|
void |
setArchetypeName(@NotNull java.lang.String archetypeName)
Sets the name of this archetype.
|
void |
setArtifact()
Converts this game object into an artifact.
|
void |
setEditorFolder(@Nullable java.lang.String editorFolder)
Set the editor folder.
|
void |
setLowestPart(boolean isLowestPart)
Sets whether this part has the smallest y coordinate when painting the
image.
|
void |
setMultiPartNr(int multiPartNr)
Sets the multi part id.
|
void |
setMultiShapeID(int multiShapeID)
Sets the multi shape id.
|
void |
setMultiX(int multiX)
Sets the x-position of this part of a multi-part object.
|
void |
setMultiY(int multiY)
Sets the y-position of this part of a multi-part object.
|
addMsgTextLine, addObjectText, addTailPart, clone, countInvObjects, facesReloaded, getAnimName, getArchetype, getAttributeDouble, getAttributeInt, getAttributeLong, getAttributeString, getBestName, getDirection, getEditType, getFaceName, getFaceObjName, getFaceObjSource, getHead, getLoreText, getMapLocation, getMapX, getMapY, getMaxX, getMaxY, getMinX, getMinY, getMsgText, getMultiNext, getMultiRefCount, getNormalImage, getObjectText, getObjName, getSizeX, getSizeY, getTypeNo, hasAttribute, isDefaultGameObject, isEqual, isHead, isMulti, isTail, newInstance, notifyBeginChange, notifyEndChange, notifyTransientChange, removeTailParts, setAttributeString, setEditType, setLoreText, setMapX, setMapY, setMsgText, setMulti, setObjectFace, setObjectText, toString, usesDirection, visit
getAttributeDouble, getAttributeInt, getAttributeLong, getAttributeString, hasAttribute, removeAttribute, setAttributeInt
@NotNull @NotNull java.util.Iterator<G> iterator()
iterator
in interface java.lang.Iterable<G extends GameObject<G,A,R>>
void addLast(@NotNull G gameObject)
GameObject
at the end of this Container.gameObject
- the free yet unlinked GameObject
to be placed
in the inventoryjava.lang.IllegalArgumentException
- if gameObject
already is inside
another containervoid addFirst(@NotNull G gameObject)
GameObject
at the beginning of this Container.gameObject
- the free yet unlinked GameObject
to be placed
in the inventoryjava.lang.IllegalArgumentException
- if gameObject
already is inside
another container@NotNull @NotNull java.lang.String getArchetypeName()
void setArchetypeName(@NotNull @NotNull java.lang.String archetypeName)
archetypeName
- the nameboolean isUndefinedArchetype()
true
if this archetype denotes an undefined archetypevoid setMultiX(int multiX)
multiX
- the x-distance of this part to the head partvoid setMultiY(int multiY)
multiY
- the y-distance of this part to the head partint getMultiX()
int getMultiY()
boolean isLowestPart()
void setLowestPart(boolean isLowestPart)
isLowestPart
- whether this part has the smallest y coordinateint getMultiShapeID()
void setMultiShapeID(int multiShapeID)
multiShapeID
- the multi shape idint getMultiPartNr()
void setMultiPartNr(int multiPartNr)
multiPartNr
- the multi part id@Nullable @Nullable java.lang.String getEditorFolder()
void setEditorFolder(@Nullable @Nullable java.lang.String editorFolder)
editorFolder
- the editor folderboolean isArtifact()
true
if this GameObject is an Artifact, otherwise false
.void setArtifact()
isArtifact()
@NotNull @NotNull java.util.Collection<java.lang.String> getAttributeKeys()