1package com.osroyale.content.skill.impl.farming.patches;
3import com.osroyale.content.skill.impl.farming.FarmingConstants;
4import com.osroyale.content.skill.impl.farming.zones.FarmingZone;
5import com.osroyale.game.world.Interactable;
6import com.osroyale.game.world.World;
7import com.osroyale.game.world.entity.mob.player.Player;
8import com.osroyale.game.world.items.Item;
57 super(player, zone, boundaries);
67 private boolean waterPatch(
int itemId,
int index) {
68 if (player.locking.
locked()) {
72 if (itemId != 5331 && (itemId < 5333 || itemId > 5340)) {
77 player.message(
"This patch needs to be growing something first.");
81 if (isWatered() || fullyGrown) {
82 player.message(
"This patch doesn't need watering.");
91 player.message(
"You water the patch.");
92 player.animate(FarmingConstants.WATERING_CAN_ANIM);
93 player.inventory.
replace(itemId, itemId == 5333 ? itemId - 2 : itemId - 1, index,
true);
94 player.locking.lock(5 * 3 / 5);
98 player.resetAnimation();
105 public boolean itemOnObject(Item item,
int index) {
106 return waterPatch(item.getId(), index) || super.itemOnObject(item, index);
117 protected void onGrowth() {
final DialogueFactory sendStatement(String... lines)
final DialogueFactory execute()
WaterablePatch(Player player, FarmingZone zone, Interactable[] boundaries)
final void sendPatchConfigs(Player player)
static void schedule(Task task)
final boolean replace(int oldId, int newId, int index, boolean refresh)