1package com.runehive.content.skill.impl.woodcutting;
3import com.runehive.Config;
4import com.runehive.content.achievement.AchievementHandler;
5import com.runehive.content.achievement.AchievementKey;
6import com.runehive.content.activity.randomevent.RandomEventHandler;
7import com.runehive.content.clanchannel.content.ClanTaskKey;
8import com.runehive.content.pet.PetData;
9import com.runehive.content.pet.Pets;
10import com.runehive.content.prestige.PrestigePerk;
11import com.runehive.content.skill.impl.firemaking.FiremakingData;
12import com.runehive.content.skillcape.SkillCape;
13import com.runehive.game.action.Action;
14import com.runehive.game.action.policy.WalkablePolicy;
15import com.runehive.game.task.impl.ObjectReplacementEvent;
16import com.runehive.game.world.World;
17import com.runehive.game.world.entity.mob.player.Player;
18import com.runehive.game.world.entity.skill.Skill;
19import com.runehive.game.world.items.Item;
20import com.runehive.game.world.items.ItemDefinition;
21import com.runehive.game.world.object.GameObject;
22import com.runehive.game.world.position.Area;
23import com.runehive.net.packet.out.SendMessage;
24import com.runehive.util.RandomUtils;
25import com.runehive.util.Utility;
27import java.util.Optional;
47 if (
getMob().inventory.getFreeSlots() == 0) {
48 getMob().dialogueFactory.sendStatement(
"You can't carry anymore logs.").execute();
55 if (
object ==
null || !
object.active()) {
64 getMob().playerAssistant.activateSkilling(1);
73 if (firemakingData.isPresent()) {
93 object.getGenericAttributes().set(
"logs", -1);
95 object.getGenericAttributes().set(
"logs", tree.logs);
109 if (!
object.getGenericAttributes().has(
"logs")) {
110 object.getGenericAttributes().set(
"logs",
tree.logs);
122 if (
object ==
null || !
object.active() ||
object.getGenericAttributes() ==
null) {
145 return "woodcutting-action";
The class that contains setting-related constants for the server.
static final double WOODCUTTING_MODIFICATION
The experience modification for woodcutting.
Handles the achievements.
static void activate(Player player, AchievementKey achievement)
Activates the achievement for the individual player.
static void trigger(Player player)
Handles spawning, rewarding and picking up of pets.
static void onReward(Player player, int item, int chance)
Handles calculating the chance of a player receiving a skilling pet.
Handles dropping & searching birds nest which are obtained from woodcutting.
static void drop(Player player)
Handles dropping the birds nest.
void onSchedule()
A function executed on registration.
WalkablePolicy getWalkablePolicy()
Gets the WalkablePolicy of this action.
boolean canSchedule()
A function executed on registration.
void execute()
A function representing the unit of work that will be carried out.
String getName()
Gets the name of this action.
void onCancel(boolean logout)
A function executed on cancellation.
WoodcuttingAction(Player mob, GameObject object, TreeData tree, AxeData axe)
static boolean success(Player player, TreeData tree, AxeData axe)
T getMob()
Gets the player.
final T mob
The Mob associated with this ActionEvent.
Action(T mob, int delay, boolean instant)
Creates a new Action randomevent.
synchronized final void cancel()
Cancels all subsequent executions.
An randomevent which replaces an object with another object.
Represents the game world.
static void schedule(Task task)
Submits a new event.
This class represents a character controlled by a player.
Represents a trainable and usable skill.
static final int WOODCUTTING
The woodcutting skill id.
static final int FIREMAKING
The firemaking skill id.
Represents all of an in-game Item's attributes.
static ItemDefinition get(int id)
Gets an item definition.
String getName()
Gets the item name.
The container class that represents an item that can be interacted with.
Handles checking if mobs are in a certain area.
static boolean inRegularDonatorZone(Interactable entity)
static boolean inSuperDonatorZone(Interactable entity)
The OutgoingPacket that sends a message to a Players chatbox in the client.
A static-util class that provides additional functionality for generating pseudo-random numbers.
static boolean success(double value)
Determines if a pseudorandomly generated double rounded to two decimal places is below or equal to va...
Handles miscellaneous methods.
static int random(int bound)
Handles the perk rewards from prestiging.
static Optional< FiremakingData > forId(int id)
Represents types of axes.
Holds all the data for trees.
static boolean isEquipped(Player player, SkillCape cape)
A queue policy determines whether the action can occur while walking.
NON_WALKABLE
This indicates actions cannot occur while walking.
Represents a game object.