Module moe.maple.script.api
Interface FieldedObject<T>
- All Superinterfaces:
ScriptObject<T>
- All Known Subinterfaces:
LifeObject<T>,MobObject<T>,NpcObject<T>,PortalObject<T>,ReactorObject<T>,UserObject<T>
public interface FieldedObject<T> extends ScriptObject<T>
-
Method Summary
Modifier and Type Method Description Optional<? extends FieldObject>getField()Some script objects should always have a field attached to them.default intgetFieldId()intgetObjectId()FieldObjects are thrown into a pool and assigned a key.intgetX()intgetY()
-
Method Details
-
getObjectId
int getObjectId()FieldObjects are thrown into a pool and assigned a key.- Returns:
- object id for this object
-
getX
int getX()- Returns:
- object's x position on the field.
-
getY
int getY()- Returns:
- object's y position on the field.
-
getField
Optional<? extends FieldObject> getField()Some script objects should always have a field attached to them. Think users, npcs, monsters, etc. This isn't 100% guaranteed, so we have to use an optional for use-cases where the outliers occur.- Returns:
- the object's current field. proxied.
-
getFieldId
default int getFieldId()
-