1package com.osroyale.game.task.impl;
3import com.osroyale.content.skill.impl.woodcutting.AxeData;
4import com.osroyale.game.Animation;
5import com.osroyale.game.UpdatePriority;
6import com.osroyale.game.task.Task;
7import com.osroyale.game.world.entity.mob.Direction;
8import com.osroyale.game.world.entity.mob.player.Player;
9import com.osroyale.game.world.entity.skill.Skill;
10import com.osroyale.game.world.object.GameObject;
11import com.osroyale.net.packet.out.SendMessage;
13import java.util.Optional;
43public class ChopVineTask
extends Task {
46 private final Player player;
48 private final int respawn;
54 this.respawn = respawn;
59 if (!player.getPosition().isWithinDistance(
object.getPosition(), 1)) {
65 player.send(
new SendMessage(
"You need a woodcutting level of 34 or more to cut this."));
72 if (!result.isPresent()) {
73 player.send(
new SendMessage(
"You need an axe to cut this."));
87 }
else if (tick == respawn / 2) {
89 player.walk(player.getPosition().transform(direction.getDirectionX() * 2, direction.getDirectionY() * 2),
true);
90 }
else if (tick >= respawn) {
synchronized final void cancel()
Task(boolean instant, int delay)
void onCancel(boolean logout)
static final int WOODCUTTING
static Optional< AxeData > getDefinition(Player player)
static Direction getDirection(int deltaX, int deltaY)