1package com.runehive.content.skill.impl.farming;
3import com.google.gson.JsonArray;
4import com.google.gson.JsonObject;
5import com.runehive.content.skill.impl.farming.zones.*;
6import com.runehive.game.world.entity.mob.player.Player;
7import com.runehive.game.world.items.Item;
8import com.runehive.game.world.object.GameObject;
10import java.util.LinkedList;
14 private final List<FarmingZone>
zones =
new LinkedList<>();
24 boolean success =
false;
52 boolean success =
false;
62 boolean success =
false;
76 zones.forEach(zone -> zone.sendPatchConfigs(player));
80 JsonObject
object =
new JsonObject();
82 object.add(zone.getClass().getSimpleName(), zone.toJson());
89 if (!
object.has(zone.getClass().getSimpleName())) {
93 JsonArray thing =
object.get(zone.getClass().getSimpleName()).getAsJsonArray();
void fromJson(JsonObject object)
void regionChange(Player player)
static boolean itemOnObject(Player player, GameObject object, Item item, int slot)
static void tick(Player player)
static double getBonus(Player player)
static boolean secondClickObject(Player player, GameObject object)
final List< FarmingZone > zones
static boolean firstClickObject(Player player, GameObject object)
The Ardougne farming zone.
The Catherby farming zone.
The Falador farming zone.
A zone that manages farming patches.
final void tick()
Ticks the farming patches in this zone.
boolean itemOnObject(GameObject object, Item item, int slot)
Handles using an item on a farming patch.
boolean clickObject(GameObject object, int opcode)
Handles clicking a farming patch.
boolean isViewable(Position position)
Checks if a position can see this farming zone.
The Phasmaty farming zone.
This class represents a character controlled by a player.
final Equipment equipment
The container class that represents an item that can be interacted with.
final int getId(int index)
Gets the item id located on index.
final boolean containsAll(int... identifiers)
Determines if this container contains all identifiers.
Represents a game object.