1package com.runehive.game.world.object;
3import com.runehive.game.world.World;
4import com.runehive.game.world.entity.Entity;
5import com.runehive.game.world.entity.EntityType;
6import com.runehive.game.world.entity.mob.Mob;
7import com.runehive.game.world.entity.mob.player.Player;
8import com.runehive.game.world.pathfinding.TraversalMap;
9import com.runehive.game.world.position.Position;
10import com.runehive.game.world.region.Region;
11import com.runehive.net.packet.out.SendAddObject;
12import com.runehive.net.packet.out.SendRemoveObject;
13import com.runehive.util.generic.GenericAttributes;
15import java.util.Objects;
17import static com.runehive.game.world.object.ObjectDirection.NORTH;
18import static com.runehive.game.world.object.ObjectDirection.SOUTH;
206 return String.format(
"CustomGameObject[id=%s, loc=%s, width=%s, len=%s, rot=%s, type=%s]",
getId(),
getPosition(),
width(),
length(),
getDirection(),
getObjectType());
Represents the game world.
static RegionManager getRegions()
void setRegistered(boolean registered)
Entity(Position position)
final boolean isRegistered()
static final int DEFAULT_INSTANCE
Entity destroy()
Destroys this entity.
void setPosition(Position position)
This class represents a character controlled by a player.
ObjectType type
The object type.
void rotate(ObjectDirection direction)
EntityType getType()
Gets the EntityType.
ObjectType getObjectType()
Gets the object type.
GameObjectDefinition getDefinition()
Gets the object definition.
GenericAttributes genericAttributes
The generic attributes.
void addToRegion(Region objectRegion)
Adds this entity to the specified region.
boolean equals(Object obj)
CustomGameObject(int id, int instance, Position position, ObjectDirection direction, ObjectType type)
String getName()
Gets the name of this entity.
CustomGameObject(int id, int instance, Position position)
void unregister()
Unregisters an entity from the World.
void removeFromRegion(Region objectRegion)
Removes this entity from the specified region.
boolean active()
Determines if this object is active on the world.
void register()
Registers an entity to the World.
ObjectDirection direction
The object direction.
GameObjectDefinition definition
The object definition.
CustomGameObject(int id, Position position, ObjectDirection direction, ObjectType type)
ObjectDirection getDirection()
Gets the rotation.
GenericAttributes getGenericAttributes()
Gets the generic attributes.
CustomGameObject(int id, Position position)
Represents a single type of object.
static GameObjectDefinition forId(int id)
Gets an object definition by its id.
Contains traversal data for a set of regions.
static void markObject(Region region, GameObject object, boolean add, boolean list)
Marks a GameObject with the specified attributes on the specified Position to the TraversalMap.
Represents a single tile on the game world.
boolean equals(Object obj)
Represents a single region.
boolean containsObject(int height, GameObject object)
static final Map< Position, GameObject > ACTIVE_OBJECT
Region[] getSurroundingRegions(Position position)
Gets the regions surrounding a position.
Holds generic attributes.
The enumerated type whose elements represent the directions for objects.
The enumerated type whose elements represent all of the object types.
GENERAL_PROP
Represents all kinds of objects, trees, statues, signs, fountains etc.
Represents a game object.
default int getId()
Gets the object id.