1package com.osroyale.content.skill.impl.farming.patches.impl;
3import com.osroyale.content.skill.impl.farming.FarmingConstants;
4import com.osroyale.content.skill.impl.farming.patches.WaterablePatch;
5import com.osroyale.content.skill.impl.farming.plants.Flower;
6import com.osroyale.content.skill.impl.farming.plants.Plant;
7import com.osroyale.content.skill.impl.farming.zones.FarmingZone;
8import com.osroyale.game.world.Interactable;
9import com.osroyale.game.world.World;
10import com.osroyale.game.world.entity.mob.player.Player;
11import com.osroyale.game.world.items.Item;
67 super(player, zone, boundaries);
77 private boolean plantScareCrow(
int item,
int index) {
78 if (player.locking.
locked()) {
87 player.message(
"You need to clear the patch before planting a scarecrow.");
93 player.locking.lock(2 * 3 / 5);
96 player.message(
"You put a scarecrow on the flower patch, and some weeds start to grow around it.");
97 plant = plantForSeed(0x24);
112 if (!isDead() && fullyGrown && plant.getSeedId() == protect) {
116 return protect ==
SCARECROW && plant.getSeedId() >= 0x21 && plant.getSeedId() <= 0x24;
120 public Plant plantForSeed(
int seedId) {
121 return Flower.forId(seedId);
125 public boolean itemOnObject(Item item,
int index) {
126 return plantScareCrow(item.getId(), index) || super.itemOnObject(item, index);
WaterablePatch(Player player, FarmingZone zone, Interactable[] boundaries)
boolean protectsDisease(int protect)
static final int SCARECROW
FlowerPatch(Player player, FarmingZone zone, Interactable[] boundaries)
final void sendPatchConfigs(Player player)
static void schedule(Task task)
boolean remove(Item item)