1package com.runehive.game.world.object;
3import com.runehive.game.world.World;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.game.world.pathfinding.TraversalMap;
6import com.runehive.game.world.position.Position;
7import com.runehive.game.world.region.Region;
8import com.runehive.net.packet.out.SendAddObject;
9import com.runehive.net.packet.out.SendRemoveObject;
10import com.runehive.util.Utility;
11import com.runehive.util.generic.GenericAttributes;
13import java.util.Objects;
15import static com.runehive.game.world.object.ObjectDirection.*;
156 if (obj ==
this)
return true;
166 return String.format(
"StaticGameObject[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()
This class represents a character controlled by a player.
Represents a single type of object.
static GameObjectDefinition forId(int id)
Gets an object definition by its id.
GameObjectDefinition getDefinition()
Gets the object definition.
GenericAttributes getGenericAttributes()
Gets the generic attributes.
final Position position
The object position coordinates.
void register()
Registers the game object.
GenericAttributes genericAttributes
The generic attributes.
boolean active()
Determines if this object is active on the world.
ObjectType type
The object type.
ObjectDirection direction
A byte holding the object rotation.
ObjectType getObjectType()
Gets the object type.
GameObjectDefinition definition
The object definition.
int length()
Gets the length.
ObjectDirection getDirection()
Gets the rotation.
int width()
Gets the width.
void rotate(ObjectDirection direction)
void unregister()
Unregisters the game object.
boolean equals(Object obj)
Position getPosition()
Gets the regional location.
StaticGameObject(GameObjectDefinition definition, Position position, ObjectType type, ObjectDirection direction)
Creates the game object.
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.
Represents a single region.
boolean containsObject(int height, GameObject object)
static final int VIEW_DISTANCE
Region[] getSurroundingRegions(Position position)
Gets the regions surrounding a position.
Handles miscellaneous methods.
static boolean withinViewingDistance(Interactable source, Interactable target, int radius)
Holds generic attributes.
The enumerated type whose elements represent the directions for objects.
The enumerated type whose elements represent all of the object types.
Represents a game object.
default int getInstancedHeight()
default int getId()
Gets the object id.