RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.game.world.entity.Entity Class Referenceabstract

Represents a character in the game world, i.e. More...

Inheritance diagram for com.runehive.game.world.entity.Entity:
Collaboration diagram for com.runehive.game.world.entity.Entity:

Public Member Functions

abstract void addToRegion (Region region)
 Adds this entity to the specified region.
 Entity (Position position)
 Entity (Position position, boolean visible)
abstract boolean equals (Object obj)
Position getCenterPosition ()
int getHeight ()
int getIndex ()
abstract String getName ()
 Gets the name of this entity.
Position getPosition ()
Region getRegion ()
abstract EntityType getType ()
 Gets the EntityType.
int getX ()
int getY ()
abstract int hashCode ()
boolean is (EntityType type)
final boolean isCustomObject ()
 Check if an entity is an object.
final boolean isRegistered ()
final boolean isStaticObject ()
 Check if an entity is an object.
boolean isValid ()
 Validates this npc based on its current region and registered state.
boolean isVisible ()
int length ()
void onStep ()
abstract void register ()
 Registers an entity to the World.
abstract void removeFromRegion (Region region)
 Removes this entity from the specified region.
void setIndex (int index)
void setLength (int length)
void setPosition (Position position)
void setVisible (boolean visible)
void setWidth (int width)
void setX (int x)
void setY (int y)
void setZ (int z)
String toString ()
abstract void unregister ()
 Unregisters an entity from the World.
int width ()

Public Attributes

int instance = DEFAULT_INSTANCE

Static Public Attributes

static final int DEFAULT_INSTANCE = 0

Protected Member Functions

Entity destroy ()
 Destroys this entity.
void setRegistered (boolean registered)

Private Attributes

Region currentRegion
int index
int length
Position position
boolean registered
boolean visible
int width

Additional Inherited Members

Static Public Member Functions inherited from com.runehive.game.world.Interactable
static Interactable create (Position position)
 Creates a new instance of an Interactable.
static Interactable create (Position position, int width, int length)
 Creates a new instance of an Interactable.

Detailed Description

Represents a character in the game world, i.e.

a Player or an NPC.

Author
Michael | Chex

Definition at line 13 of file Entity.java.

Constructor & Destructor Documentation

◆ Entity() [1/2]

com.runehive.game.world.entity.Entity.Entity ( Position position)

Definition at line 25 of file Entity.java.

25 {
26 this(position, true);
27 }

References position.

Referenced by destroy().

Here is the caller graph for this function:

◆ Entity() [2/2]

com.runehive.game.world.entity.Entity.Entity ( Position position,
boolean visible )

Definition at line 29 of file Entity.java.

29 {
30 setPosition(position);
31 setVisible(visible);
32 this.width = 1;
33 this.length = 1;
34 }

References position, setPosition(), setVisible(), and visible.

Here is the call graph for this function:

Member Function Documentation

◆ addToRegion()

abstract void com.runehive.game.world.entity.Entity.addToRegion ( Region region)
abstract

Adds this entity to the specified region.

Parameters
regionThe region.

Reimplemented in com.runehive.content.combat.cannon.Cannon, com.runehive.game.world.entity.mob.npc.Npc, com.runehive.game.world.entity.mob.player.Player, com.runehive.game.world.items.ground.GroundItem, and com.runehive.game.world.object.CustomGameObject.

Referenced by setPosition().

Here is the caller graph for this function:

◆ destroy()

Entity com.runehive.game.world.entity.Entity.destroy ( )
protected

Destroys this entity.

Returns
This entity.

Definition at line 143 of file Entity.java.

143 {
144 removeFromRegion(currentRegion);
145 setRegistered(false);
146 return this;
147 }

References currentRegion, Entity(), removeFromRegion(), and setRegistered().

Referenced by com.runehive.content.bot.PlayerBot.unregister(), com.runehive.content.combat.cannon.Cannon.unregister(), com.runehive.game.world.entity.mob.npc.Npc.unregister(), com.runehive.game.world.entity.mob.player.Player.unregister(), and com.runehive.game.world.object.CustomGameObject.unregister().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ equals()

abstract boolean com.runehive.game.world.entity.Entity.equals ( Object obj)
abstract

Reimplemented in com.runehive.content.combat.cannon.Cannon, com.runehive.game.world.entity.mob.npc.Npc, com.runehive.game.world.entity.mob.player.Player, com.runehive.game.world.items.ground.GroundItem, and com.runehive.game.world.object.CustomGameObject.

Referenced by com.runehive.content.activity.impl.duelarena.DuelArenaListener.canAttack(), com.runehive.game.world.entity.combat.CombatUtil.canAttack(), com.runehive.game.world.entity.combat.CombatUtil.canBasicAttack(), com.runehive.content.pet.Pets.dialogue(), com.runehive.game.world.entity.mob.Mob.face(), com.runehive.content.activity.impl.fightcaves.FightCaves.handleDeath(), com.runehive.content.activity.inferno.Inferno.handleDeath(), com.runehive.game.world.entity.combat.magic.MagicImpact.hitEvent(), com.runehive.game.world.entity.combat.ranged.RangedEffects.hitEvent(), com.runehive.game.world.entity.combat.strategy.player.custom.ScytheOfViturStrategy.hitEvent(), com.runehive.game.world.entity.combat.strategy.player.special.melee.DinhsBulwark.hitEvent(), com.runehive.game.world.entity.combat.strategy.player.special.melee.Dragon2h.hitEvent(), com.runehive.game.world.entity.combat.Combat< T extends Mob >.isAttacking(), com.runehive.content.activity.impl.barrows.Barrows.onDeath(), com.runehive.content.activity.impl.duelarena.DuelArenaActivity.onDeath(), com.runehive.content.activity.impl.kraken.KrakenActivity.onDeath(), com.runehive.content.activity.impl.zulrah.ZulrahActivity.onDeath(), and com.runehive.game.world.entity.mob.Mob.takeStep().

Here is the caller graph for this function:

◆ getCenterPosition()

Position com.runehive.game.world.entity.Entity.getCenterPosition ( )

Definition at line 44 of file Entity.java.

44 {
45 final int width = width();
46 final int length = length();
47 final Position position = getPosition();
48 return width == 1 && length == 1 ? position
49 : new Position(position.getCoordFaceX(width), position.getCoordFaceY(getHeight()), position.getHeight());
50 }

References getHeight(), getPosition(), length, position, and width.

Here is the call graph for this function:

◆ getHeight()

int com.runehive.game.world.entity.Entity.getHeight ( )
Returns
the z coordinate of the getPosition()

Implements com.runehive.game.world.Interactable.

Definition at line 82 of file Entity.java.

82 {
83 return position.getHeight();
84 }

References position.

Referenced by com.runehive.content.Obelisks.activate(), com.runehive.game.world.region.Region.addGroundItem(), com.runehive.game.world.region.Region.addNpc(), com.runehive.game.world.region.Region.addPlayer(), com.runehive.content.combat.cannon.Cannon.addToRegion(), com.runehive.game.world.items.ground.GroundItem.addToRegion(), com.runehive.game.world.object.CustomGameObject.addToRegion(), com.runehive.content.skill.impl.hunter.Hunter.clickItem(), com.runehive.game.world.pathfinding.path.impl.AStarPathFinder.find(), com.runehive.game.world.pathfinding.path.impl.DijkstraPathFinder.find(), com.runehive.game.world.region.RegionManager.forNearbyPlayer(), getCenterPosition(), com.runehive.game.world.region.RegionManager.getLocalNpcs(), com.runehive.game.world.region.RegionManager.getLocalPlayers(), com.runehive.content.activity.impl.fightcaves.FightCaves.handleDeath(), com.runehive.content.activity.inferno.Inferno.handleDeath(), com.runehive.content.activity.infernomobs.JalTokJad.hit(), com.runehive.game.world.position.Boundary.isIn(), com.runehive.game.world.entity.mob.player.Player.loadRegion(), com.runehive.content.skill.impl.agility.obstacle.impl.SeersClimbInteraction.onExecution(), com.runehive.content.combat.cannon.Cannon.register(), com.runehive.game.world.object.CustomGameObject.register(), com.runehive.content.combat.cannon.Cannon.removeFromRegion(), com.runehive.game.world.items.ground.GroundItem.removeFromRegion(), com.runehive.game.world.object.CustomGameObject.removeFromRegion(), com.runehive.game.world.region.Region.removeGroundItem(), com.runehive.game.world.region.Region.removeNpc(), com.runehive.game.world.region.Region.removePlayer(), com.runehive.game.world.region.Region.sendGameObjects(), com.runehive.game.world.region.Region.sendGroundItems(), setPosition(), setX(), setY(), com.runehive.game.world.entity.combat.strategy.npc.boss.StoneGuardian.BoomAttack.start(), com.runehive.net.packet.out.SendPlayerUpdate.updateMovement(), and com.runehive.content.activity.impl.kraken.KrakenActivityListener.withinDistance().

Here is the caller graph for this function:

◆ getIndex()

◆ getName()

abstract String com.runehive.game.world.entity.Entity.getName ( )
abstract

Gets the name of this entity.

Returns
The entity's name.

Reimplemented in com.runehive.content.combat.cannon.Cannon, com.runehive.game.world.entity.mob.npc.Npc, com.runehive.game.world.entity.mob.player.Player, com.runehive.game.world.items.ground.GroundItem, and com.runehive.game.world.object.CustomGameObject.

Referenced by com.runehive.game.world.entity.combat.strategy.player.special.melee.DragonScimitar.attack(), com.runehive.game.world.entity.combat.strategy.player.special.melee.DragonWarhammer.attack(), com.runehive.content.activity.impl.duelarena.DuelArenaListener.canAttack(), com.runehive.game.world.entity.combat.CombatUtil.canAttack(), com.runehive.game.world.entity.combat.strategy.player.PlayerMagicStrategy.canAttack(), com.runehive.game.world.entity.combat.strategy.player.PlayerMagicStrategy.getHits(), com.runehive.game.world.entity.combat.attack.listener.item.AhrimListener.hit(), com.runehive.game.world.entity.combat.attack.listener.item.ToragListener.hit(), com.runehive.game.world.entity.combat.attack.listener.item.ImbuedSlayerHelmListener.modifyAttackLevel(), com.runehive.game.world.entity.combat.attack.listener.item.SlayerHelmListener.modifyAttackLevel(), com.runehive.game.world.entity.combat.attack.listener.item.ImbuedSlayerHelmListener.modifyMagicLevel(), com.runehive.game.world.entity.combat.attack.listener.item.ImbuedSlayerHelmListener.modifyRangedLevel(), com.runehive.game.world.entity.combat.attack.listener.item.ImbuedSlayerHelmListener.modifyStrengthLevel(), com.runehive.game.world.entity.combat.attack.listener.item.SlayerHelmListener.modifyStrengthLevel(), and com.runehive.game.world.entity.mob.Mob.pathfinderProjectiles().

Here is the caller graph for this function:

◆ getPosition()

Position com.runehive.game.world.entity.Entity.getPosition ( )
Returns
the current location

Implements com.runehive.game.world.Interactable.

Reimplemented in com.runehive.content.combat.cannon.Cannon.

Definition at line 40 of file Entity.java.

40 {
41 return position;
42 }

References position.

Referenced by com.runehive.content.pet.Pets.abandon(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.AcidTask(), com.runehive.content.Obelisks.activate(), com.runehive.game.world.region.RegionBlock.addGroundItem(), com.runehive.net.packet.out.SendNpcUpdate.addNewNpc(), com.runehive.game.world.items.ground.GroundItem.addToRegion(), com.runehive.game.world.object.CustomGameObject.addToRegion(), com.runehive.game.world.pathfinding.path.impl.SimplePathFinder.addWalks(), com.runehive.net.packet.out.SendNpcUpdate.appendFaceCoordinateMask(), com.runehive.net.packet.out.SendPlayerUpdate.appendFaceCoordinteMask(), com.runehive.net.packet.out.SendPlayerUpdate.appendForceMovementMask(), com.runehive.game.world.entity.combat.Combat< T extends Mob >.attack(), com.runehive.content.wintertodt.Wintertodt.attackPyromancers(), com.runehive.game.world.entity.combat.attack.listener.npc.Alkahrid.block(), com.runehive.game.world.entity.mob.player.PlayerDeath.calculateDropItems(), com.runehive.content.activity.infernomobs.Jalimkot.canAttack(), com.runehive.game.world.entity.combat.strategy.player.special.melee.DragonSpear.canAttack(), com.runehive.content.skill.impl.hunter.trap.TrapManager.canLay(), com.runehive.content.skill.impl.firemaking.Firemaking.clickObject(), com.runehive.content.skill.impl.construction.House.construct(), com.runehive.content.wintertodt.Wintertodt.doMagicAttack(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.dragonFireTickableTask(), com.runehive.content.combat.cannon.CannonManager.drop(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.net.packet.out.SendCameraMovePosition.encode(), com.runehive.net.packet.out.SendCameraTurnPosition.encode(), com.runehive.net.packet.out.SendMapRegion.encode(), com.runehive.game.world.items.ground.GroundItem.equals(), com.runehive.game.world.object.CustomGameObject.equals(), com.runehive.content.skill.impl.agility.obstacle.ObstacleInteraction.execute(), com.runehive.game.action.impl.RevShortcutAction.execute(), com.runehive.game.world.entity.mob.Mob.face(), com.runehive.game.world.entity.mob.Mob.face(), com.runehive.game.world.pathfinding.path.impl.AStarPathFinder.find(), com.runehive.game.world.pathfinding.path.impl.DijkstraPathFinder.find(), com.runehive.game.world.pathfinding.path.impl.SimplePathFinder.find(), com.runehive.content.ai.AIDialogueHandler.findNearbyNpc(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vetion.finishIncoming(), com.runehive.content.skill.impl.farming.Farming.firstClickObject(), com.runehive.util.Utility.fixInsidePosition(), com.runehive.game.world.entity.mob.Mob.forceMove(), com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy.getAttackDelay(), getCenterPosition(), com.runehive.game.world.region.RegionManager.getLocalNpcs(), com.runehive.game.world.region.RegionManager.getLocalPlayers(), com.runehive.content.skill.impl.hunter.trap.TrapManager.goodArea(), com.runehive.content.ai.AIDialogueHandler.handleAICommand(), com.runehive.content.lms.LMSGame.handleFogDamage(), com.runehive.content.ai.LazyAIManager.handleGandalfAIClick(), com.runehive.net.packet.in.DropItemPacketListener.handlePacket(), com.runehive.content.skill.impl.hunter.trap.TrapManager.handleRegionChange(), com.runehive.game.world.items.ground.GroundItem.hashCode(), com.runehive.game.world.object.CustomGameObject.hashCode(), com.runehive.content.wintertodt.Wintertodt.healPyromancer(), com.runehive.game.world.entity.combat.strategy.npc.boss.TzTokJad.RangedAttack.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.FireballAttack.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.FrozenSpecial.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Zulrah.MeleeAttack.hit(), com.runehive.game.world.entity.combat.strategy.player.special.melee.DragonSpear.hit(), com.runehive.game.world.entity.combat.strategy.player.custom.ScytheOfViturStrategy.hitEvent(), com.runehive.game.world.position.Area.inArmadyl(), com.runehive.game.world.position.Area.inBandos(), com.runehive.game.world.position.Area.inSaradomin(), com.runehive.game.world.position.Area.inZamorak(), com.runehive.game.world.position.Position.isWithinDiagonalDistance(), com.runehive.content.skill.impl.farming.Farming.itemOnObject(), com.runehive.content.lms.lobby.LMSLobby.joinLobby(), com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.LavaAttack.lavaTask(), com.runehive.content.lms.lobby.LMSLobby.leaveLobby(), com.runehive.game.world.entity.mob.player.Player.loadRegion(), com.runehive.content.pet.Pets.onDeath(), com.runehive.content.skill.impl.firemaking.FiremakingAction.onDestruct(), com.runehive.content.skill.impl.agility.obstacle.impl.ClimbOverInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.RopeSwingInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.SteppingStonesInteraction.onExecution(), com.runehive.content.skill.impl.agility.obstacle.impl.WildernessDoorInteraction.onExecution(), com.runehive.game.world.entity.mob.player.Player.onStep(), com.runehive.content.ProfileViewer.open(), com.runehive.game.world.entity.combat.strategy.npc.boss.Hydra.poisonAttack(), com.runehive.game.world.entity.combat.strategy.npc.boss.Hydra.poisonTask(), com.runehive.game.ProjectileTest.ProjectileTest(), com.runehive.content.bot.PlayerBot.register(), com.runehive.game.world.entity.mob.npc.Npc.register(), com.runehive.game.world.entity.mob.player.Player.register(), com.runehive.game.world.items.ground.GroundItem.register(), com.runehive.game.world.object.CustomGameObject.register(), com.runehive.game.world.entity.combat.strategy.player.custom.ToxicBlowpipeStrategy.removeAmmunition(), com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy.removeAmmunition(), com.runehive.game.world.items.ground.GroundItem.removeFromRegion(), com.runehive.game.world.object.CustomGameObject.removeFromRegion(), com.runehive.game.world.region.RegionBlock.removeGroundItem(), com.runehive.content.skill.impl.prayer.BoneSacrifice.sacrifice(), com.runehive.content.skill.impl.farming.Farming.secondClickObject(), com.runehive.content.skill.impl.farming.zones.FarmingZone.sendPatchConfigs(), com.runehive.game.world.entity.combat.projectile.CombatProjectile.sendProjectile(), com.runehive.content.skill.impl.hunter.trap.TrapExecution.setTrapProcess(), com.runehive.content.Waypoints.setWaypoint(), com.runehive.game.world.entity.mob.player.camera.DialogueCameraDirector.shoulderShot(), com.runehive.game.world.entity.mob.Viewport.shouldRemove(), com.runehive.content.activity.inferno.Inferno.start(), com.runehive.content.activity.infernomobs.JalTokJad.RangedAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Callisto.Roar.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.LavaAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.ChaosFanatic.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.CrazyArchaeologist.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.JumpAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.MinionsAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Derwen.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.StoneGuardian.BoomAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vetion.Magic.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.FireballAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Zulrah.MeleeAttack.start(), com.runehive.game.world.entity.combat.strategy.player.PlayerMagicStrategy.start(), com.runehive.game.world.entity.mob.Mob.takeStep(), com.runehive.content.activity.impl.barrows.BarrowsUtility.teleportPlayer(), com.runehive.content.combat.cannon.CannonManager.test(), com.runehive.game.world.entity.mob.player.camera.DialogueCameraDirector.tick(), toString(), com.runehive.game.world.entity.mob.npc.Npc.toString(), com.runehive.game.world.entity.mob.player.Player.toString(), com.runehive.game.world.items.ground.GroundItem.toString(), com.runehive.game.world.object.CustomGameObject.toString(), com.runehive.game.world.object.CustomGameObject.unregister(), and com.runehive.net.packet.out.SendPlayerUpdate.updateMovement().

Here is the caller graph for this function:

◆ getRegion()

◆ getType()

◆ getX()

◆ getY()

◆ hashCode()

◆ is()

boolean com.runehive.game.world.entity.Entity.is ( EntityType type)

Definition at line 134 of file Entity.java.

134 {
135 return getType() == type;
136 }

References getType().

Here is the call graph for this function:

◆ isCustomObject()

final boolean com.runehive.game.world.entity.Entity.isCustomObject ( )

Check if an entity is an object.

Definition at line 214 of file Entity.java.

214 {
215 return getType() == EntityType.CUSTOM_OBJECT;
216 }

References com.runehive.game.world.entity.EntityType.CUSTOM_OBJECT, and getType().

Here is the call graph for this function:

◆ isRegistered()

◆ isStaticObject()

final boolean com.runehive.game.world.entity.Entity.isStaticObject ( )

Check if an entity is an object.

Definition at line 209 of file Entity.java.

209 {
210 return getType() == EntityType.STATIC_OBJECT;
211 }

References getType(), and com.runehive.game.world.entity.EntityType.STATIC_OBJECT.

Here is the call graph for this function:

◆ isValid()

boolean com.runehive.game.world.entity.Entity.isValid ( )

Validates this npc based on its current region and registered state.

Returns
True if this npc is a valid log in the game world.

Reimplemented in com.runehive.game.world.entity.mob.player.Player.

Definition at line 154 of file Entity.java.

154 {
155 return isRegistered() && currentRegion != null;
156
157 }

References currentRegion, and isRegistered().

Referenced by com.runehive.game.world.region.RegionBlock.getCustomObject(), com.runehive.game.world.region.RegionBlock.sendGameObjects(), and com.runehive.game.world.entity.mob.Viewport.shouldRemove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isVisible()

boolean com.runehive.game.world.entity.Entity.isVisible ( )

Definition at line 66 of file Entity.java.

66 {
67 return visible;
68 }

References visible.

Referenced by com.runehive.game.world.entity.combat.CombatTarget.checkAggression(), com.runehive.content.skill.impl.hunter.Hunter.clickNpc(), com.runehive.content.skill.impl.hunter.trap.TrapExecution.setTrapProcess(), com.runehive.game.world.entity.mob.Viewport.shouldRemove(), toString(), and com.runehive.content.activity.randomevent.RandomEventHandler.trigger().

Here is the caller graph for this function:

◆ length()

int com.runehive.game.world.entity.Entity.length ( )
Returns
the length

Implements com.runehive.game.world.Interactable.

Reimplemented in com.runehive.game.world.object.CustomGameObject.

Definition at line 58 of file Entity.java.

58 {
59 return length;
60 }

References length.

◆ onStep()

void com.runehive.game.world.entity.Entity.onStep ( )

Reimplemented in com.runehive.game.world.entity.mob.npc.Npc, and com.runehive.game.world.entity.mob.player.Player.

Definition at line 179 of file Entity.java.

179 {
180 }

Referenced by com.runehive.game.world.entity.mob.Mob.move().

Here is the caller graph for this function:

◆ register()

abstract void com.runehive.game.world.entity.Entity.register ( )
abstract

Registers an entity to the World.

Reimplemented in com.runehive.content.bot.PlayerBot, com.runehive.content.combat.cannon.Cannon, com.runehive.game.world.entity.mob.npc.Npc, com.runehive.game.world.entity.mob.player.Player, com.runehive.game.world.items.ground.GroundItem, and com.runehive.game.world.object.CustomGameObject.

Referenced by com.runehive.content.activity.Activity.add().

Here is the caller graph for this function:

◆ removeFromRegion()

abstract void com.runehive.game.world.entity.Entity.removeFromRegion ( Region region)
abstract

Removes this entity from the specified region.

Parameters
regionThe region.

Reimplemented in com.runehive.content.combat.cannon.Cannon, com.runehive.game.world.entity.mob.npc.Npc, com.runehive.game.world.entity.mob.player.Player, com.runehive.game.world.items.ground.GroundItem, and com.runehive.game.world.object.CustomGameObject.

Referenced by destroy(), and setPosition().

Here is the caller graph for this function:

◆ setIndex()

void com.runehive.game.world.entity.Entity.setIndex ( int index)

Definition at line 86 of file Entity.java.

86 {
87 this.index = index;
88 }

References index.

Referenced by com.runehive.game.world.region.RegionBlock.addGroundItem().

Here is the caller graph for this function:

◆ setLength()

void com.runehive.game.world.entity.Entity.setLength ( int length)

Definition at line 94 of file Entity.java.

94 {
95 this.length = length;
96 }

References length.

Referenced by com.runehive.game.world.entity.mob.Mob.transform().

Here is the caller graph for this function:

◆ setPosition()

void com.runehive.game.world.entity.Entity.setPosition ( Position position)

Definition at line 106 of file Entity.java.

106 {
107 Region region = position.getRegion();
108
109 if (!registered || (region == currentRegion && position.getHeight() == getHeight())) {
110 this.position = position;
111 return;
112 }
113
114 if (currentRegion != null) {
115 removeFromRegion(currentRegion);
116 }
117
118 this.position = position;
119 addToRegion(currentRegion = region);
120 }

References addToRegion(), currentRegion, getHeight(), position, registered, and removeFromRegion().

Referenced by Entity(), com.runehive.game.world.entity.mob.Mob.move(), com.runehive.game.world.entity.mob.player.Player.Player(), com.runehive.content.bot.PlayerBot.register(), com.runehive.content.combat.cannon.Cannon.register(), com.runehive.game.world.entity.mob.npc.Npc.register(), com.runehive.game.world.entity.mob.player.Player.register(), com.runehive.game.world.items.ground.GroundItem.register(), com.runehive.game.world.object.CustomGameObject.register(), and com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.GhostAttack.start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRegistered()

void com.runehive.game.world.entity.Entity.setRegistered ( boolean registered)
protected

◆ setVisible()

void com.runehive.game.world.entity.Entity.setVisible ( boolean visible)

Definition at line 102 of file Entity.java.

102 {
103 this.visible = visible;
104 }

References visible.

Referenced by com.runehive.content.skill.impl.hunter.trap.TrapManager.catchNPC(), Entity(), com.runehive.game.world.entity.mob.player.Player.logout(), com.runehive.content.bot.PlayerBot.PlayerBot(), and com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.JumpAttack.start().

Here is the caller graph for this function:

◆ setWidth()

void com.runehive.game.world.entity.Entity.setWidth ( int width)

Definition at line 90 of file Entity.java.

90 {
91 this.width = width;
92 }

References width.

Referenced by com.runehive.game.world.entity.mob.Mob.transform().

Here is the caller graph for this function:

◆ setX()

void com.runehive.game.world.entity.Entity.setX ( int x)

Definition at line 122 of file Entity.java.

122 {
123 position = new Position(x, getY(), getHeight());
124 }

References getHeight(), getY(), and position.

Here is the call graph for this function:

◆ setY()

void com.runehive.game.world.entity.Entity.setY ( int y)

Definition at line 126 of file Entity.java.

126 {
127 position = new Position(getX(), y, getHeight());
128 }

References getHeight(), getX(), and position.

Here is the call graph for this function:

◆ setZ()

void com.runehive.game.world.entity.Entity.setZ ( int z)

Definition at line 130 of file Entity.java.

130 {
131 position = new Position(getX(), getY(), z);
132 }

References getX(), getY(), and position.

Here is the call graph for this function:

◆ toString()

String com.runehive.game.world.entity.Entity.toString ( )

Reimplemented in com.runehive.game.world.entity.mob.npc.Npc, com.runehive.game.world.entity.mob.player.Player, com.runehive.game.world.items.ground.GroundItem, and com.runehive.game.world.object.CustomGameObject.

Definition at line 204 of file Entity.java.

204 {
205 return String.format("Entity[registered=%s, visible=%s, position=%s, type=%s", isRegistered(), isVisible(), getPosition(), getType());
206 }

References getPosition(), getType(), isRegistered(), and isVisible().

Here is the call graph for this function:

◆ unregister()

◆ width()

int com.runehive.game.world.entity.Entity.width ( )
Returns
the width

Implements com.runehive.game.world.Interactable.

Reimplemented in com.runehive.game.world.object.CustomGameObject.

Definition at line 53 of file Entity.java.

53 {
54 return width;
55 }

References width.

Member Data Documentation

◆ currentRegion

Region com.runehive.game.world.entity.Entity.currentRegion
private

Definition at line 22 of file Entity.java.

Referenced by destroy(), getRegion(), isValid(), and setPosition().

◆ DEFAULT_INSTANCE

◆ index

◆ instance

int com.runehive.game.world.entity.Entity.instance = DEFAULT_INSTANCE

Definition at line 23 of file Entity.java.

Referenced by com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.AcidTask(), com.runehive.game.world.items.ground.GroundItem.canSee(), com.runehive.game.world.object.CustomGameObject.CustomGameObject(), com.runehive.game.world.object.CustomGameObject.CustomGameObject(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.dragonFireTickableTask(), com.runehive.net.packet.out.SendAddObject.encode(), com.runehive.net.packet.out.SendGroundItem.encode(), com.runehive.game.world.object.CustomGameObject.getInstancedHeight(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.FireballAttack.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.FrozenSpecial.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.LavaAttack.lavaTask(), com.runehive.game.world.entity.mob.npc.Npc.Npc(), com.runehive.game.world.entity.mob.npc.Npc.Npc(), com.runehive.content.pet.Pets.onSpawn(), com.runehive.content.skill.impl.prayer.BoneSacrifice.sacrifice(), com.runehive.game.world.World.sendProjectile(), com.runehive.game.world.World.sendProjectile(), com.runehive.game.world.entity.mob.Viewport.shouldRemove(), com.runehive.game.world.entity.combat.strategy.npc.boss.ChaosFanatic.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.CrazyArchaeologist.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.MinionsAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.Skotizo.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vetion.Magic.start(), com.runehive.content.skill.impl.magic.teleport.Teleportation.teleport(), com.runehive.game.world.entity.mob.npc.Npc.toString(), com.runehive.game.world.entity.combat.CombatUtil.validate(), and com.runehive.game.world.entity.combat.CombatUtil.validateMobs().

◆ length

◆ position

Position com.runehive.game.world.entity.Entity.position
private

Definition at line 21 of file Entity.java.

Referenced by com.runehive.game.world.items.ground.GroundItem.create(), com.runehive.game.world.items.ground.GroundItem.createGlobal(), com.runehive.game.world.object.CustomGameObject.CustomGameObject(), com.runehive.game.world.object.CustomGameObject.CustomGameObject(), com.runehive.game.world.object.CustomGameObject.CustomGameObject(), com.runehive.game.world.object.CustomGameObject.CustomGameObject(), Entity(), Entity(), com.runehive.game.world.entity.mob.Mob.face(), com.runehive.game.world.entity.mob.Mob.face(), getCenterPosition(), getHeight(), getPosition(), getX(), getY(), com.runehive.game.world.items.ground.GroundItem.GroundItem(), com.runehive.game.world.entity.mob.Mob.Mob(), com.runehive.game.world.entity.mob.Mob.Mob(), com.runehive.game.world.entity.mob.Mob.move(), com.runehive.game.world.entity.mob.npc.Npc.Npc(), com.runehive.game.world.entity.mob.npc.Npc.Npc(), com.runehive.game.world.entity.mob.npc.Npc.Npc(), com.runehive.game.world.entity.mob.npc.Npc.Npc(), com.runehive.game.world.entity.mob.player.Player.pickup(), com.runehive.game.world.items.ground.GroundItem.pickup(), com.runehive.game.world.entity.mob.player.Player.Player(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.Portal.Portal(), setPosition(), setX(), setY(), setZ(), com.runehive.game.world.entity.mob.Mob.walk(), com.runehive.game.world.entity.mob.Mob.walkExactlyTo(), com.runehive.game.world.entity.mob.Mob.walkExactlyTo(), com.runehive.game.world.entity.mob.Mob.walkTo(), and com.runehive.game.world.entity.mob.Mob.walkTo().

◆ registered

boolean com.runehive.game.world.entity.Entity.registered
private

Definition at line 19 of file Entity.java.

Referenced by isRegistered(), setPosition(), and setRegistered().

◆ visible

boolean com.runehive.game.world.entity.Entity.visible
private

◆ width


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