1package com.runehive.content.skill.impl.hunter.birdhouse.action;
3import com.runehive.content.skill.impl.hunter.birdhouse.PlayerBirdHouseData;
4import com.runehive.game.action.Action;
5import com.runehive.game.action.policy.WalkablePolicy;
6import com.runehive.game.task.impl.PlayerSaveEvent;
7import com.runehive.game.world.entity.mob.player.Player;
8import com.runehive.game.world.entity.mob.player.persist.PlayerSerializer;
9import com.runehive.game.world.items.Item;
10import com.runehive.game.world.object.CustomGameObject;
11import com.runehive.game.world.object.ObjectDirection;
12import com.runehive.game.world.object.ObjectType;
13import com.runehive.net.packet.out.SendAddObject;
34 return "Fill birdhouse";
40 getMob().inventory.refresh();
43 getMob().dialogueFactory.sendStatement(
"Your birdhouse trap is now full of seed and will start to catch birds").execute();
44 getMob().message(
"Your birdhouse trap is now full of seed and will start to catch birds");
47 playerBirdHouseData.birdhouseTimer = System.currentTimeMillis() + 3_300_000;
50 getMob().dialogueFactory.sendStatement(
"You add " +
itemAmount +
" x " +
itemUsed.getDefinition().getName().toLowerCase() +
" to the birdhouse.").execute();
51 getMob().message(
"You add " +
itemAmount +
" x " +
itemUsed.getDefinition().getName().toLowerCase() +
" to the birdhouse.");
57 getMob().action.getCurrentAction().cancel();
String getName()
Gets the name of this action.
PlayerBirdHouseData playerBirdHouseData
WalkablePolicy getWalkablePolicy()
Gets the WalkablePolicy of this action.
void execute()
A function representing the unit of work that will be carried out.
FillBirdhouse(Player player, PlayerBirdHouseData playerBirdHouseData, Item itemUsed, int itemAmount)
T getMob()
Gets the player.
Action(T mob, int delay, boolean instant)
Creates a new Action randomevent.
This class represents a character controlled by a player.
static void save(Player player)
The container class that represents an item that can be interacted with.
Represents a static game object loaded from the map fs.
A queue policy determines whether the action can occur while walking.
WALKABLE
This indicates actions may occur while walking.
The enumerated type whose elements represent the directions for objects.
static Optional< ObjectDirection > valueOf(final int id)
Returns a ObjectDirection wrapped in an Optional for the specified id.
The enumerated type whose elements represent all of the object types.
static Optional< ObjectType > valueOf(final int id)
Returns a ObjectType wrapped in an Optional for the specified id.