RuneHive-Game
Loading...
Searching...
No Matches
PickupWaypoint.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.mob.movement.waypoint;
2
3import com.runehive.game.world.entity.mob.player.Player;
4import com.runehive.game.world.Interactable;
5import com.runehive.game.world.items.Item;
6import com.runehive.game.world.items.ground.GroundItem;
7import com.runehive.game.world.position.Position;
8
9public class PickupWaypoint extends Waypoint {
10
11 private final Player player;
12 private final Item item;
13 private final Position position;
14
16 super(player, Interactable.create(position, 0, 0));
17 this.player = player;
18 this.item = item;
19 this.position = position;
20 }
21
22 @Override
23 public void onDestination() {
24 mob.movement.reset();
26 cancel();
27 }
28
29 @Override
30 protected int getRadius() {
31 return 0;
32 }
33
34}
synchronized final void cancel()
Cancels all subsequent executions.
Definition Task.java:113
PickupWaypoint(Player player, Item item, Position position)
This class represents a character controlled by a player.
Definition Player.java:125
The container class that represents an item that can be interacted with.
Definition Item.java:21
Represents a single Ground item on the world map.
static void pickup(Player player, Item item, Position position)
Attempts to pick the specified item up.
Represents a single tile on the game world.
Definition Position.java:14
An object implementing Interactable has uses.
static Interactable create(Position position)
Creates a new instance of an Interactable.