RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.game.world.object.ObjectDirection Enum Reference

The enumerated type whose elements represent the directions for objects. More...

Collaboration diagram for com.runehive.game.world.object.ObjectDirection:

Public Member Functions

final int getId ()
 Gets the identification of this direction.
 ObjectDirection (int id)
 Creates a new ObjectDirection.

Static Public Member Functions

 [static initializer]
static Optional< ObjectDirectionvalueOf (final int id)
 Returns a ObjectDirection wrapped in an Optional for the specified id.

Public Attributes

 EAST =(2)
 The east orientation.
 NORTH =(1)
 The north orientation.
 SOUTH =(3)
 The south orientation.
 WEST =(0)
 The west orientation.

Private Attributes

final int id
 The identification of this direction.

Static Private Attributes

static final Int2ObjectMap< ObjectDirectionidToDirection = new Int2ObjectOpenHashMap<>(values.length)
 A mutable Map of int keys to ObjectDirection values.
static final ObjectDirection[] values = values()

Detailed Description

The enumerated type whose elements represent the directions for objects.

Author
lare96 http://github.com/lare96
Artem Batutin artem.nosp@m.batu.nosp@m.tin@g.nosp@m.mail.nosp@m..com

Definition at line 15 of file ObjectDirection.java.

Constructor & Destructor Documentation

◆ ObjectDirection()

com.runehive.game.world.object.ObjectDirection.ObjectDirection ( int id)

Creates a new ObjectDirection.

Definition at line 45 of file ObjectDirection.java.

45 {
46 this.id = id;
47 }

References id.

Referenced by [static initializer]().

Here is the caller graph for this function:

Member Function Documentation

◆ [static initializer]()

com.runehive.game.world.object.ObjectDirection.[static initializer]
static

References idToDirection, ObjectDirection(), and values.

Here is the call graph for this function:

◆ getId()

final int com.runehive.game.world.object.ObjectDirection.getId ( )

Gets the identification of this direction.

Returns
the identification of this direction.

Definition at line 54 of file ObjectDirection.java.

54 {
55 return id;
56 }

References id.

◆ valueOf()

Optional< ObjectDirection > com.runehive.game.world.object.ObjectDirection.valueOf ( final int id)
static

Returns a ObjectDirection wrapped in an Optional for the specified id.

Parameters
idThe game object orientation id.
Returns
The optional game object orientation.

Definition at line 80 of file ObjectDirection.java.

80 {
81 return Optional.ofNullable(idToDirection.get(id));
82 }

References idToDirection.

Referenced by com.runehive.content.skill.impl.hunter.birdhouse.action.FillBirdhouse.execute(), com.runehive.game.world.entity.mob.player.Player.loadRegion(), com.runehive.util.parser.impl.GlobalObjectParser.parse(), com.runehive.fs.cache.decoder.RegionDecoder.parseGameObject(), and com.runehive.content.skill.impl.hunter.birdhouse.Birdhouses.receiveLoot().

Here is the caller graph for this function:

Member Data Documentation

◆ EAST

◆ id

final int com.runehive.game.world.object.ObjectDirection.id
private

The identification of this direction.

Definition at line 40 of file ObjectDirection.java.

Referenced by getId(), and ObjectDirection().

◆ idToDirection

final Int2ObjectMap<ObjectDirection> com.runehive.game.world.object.ObjectDirection.idToDirection = new Int2ObjectOpenHashMap<>(values.length)
staticprivate

A mutable Map of int keys to ObjectDirection values.

Definition at line 64 of file ObjectDirection.java.

Referenced by [static initializer](), and valueOf().

◆ NORTH

◆ SOUTH

◆ values

final ObjectDirection [] com.runehive.game.world.object.ObjectDirection.values = values()
staticprivate

Definition at line 58 of file ObjectDirection.java.

Referenced by [static initializer]().

◆ WEST


The documentation for this enum was generated from the following file: