RuneHive-Game
Loading...
Searching...
No Matches
AllotmentPatch.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.farming.patches.impl;
2
3import com.runehive.content.skill.impl.farming.FarmingConstants;
4import com.runehive.content.skill.impl.farming.patches.WaterablePatch;
5import com.runehive.content.skill.impl.farming.plants.Allotment;
6import com.runehive.content.skill.impl.farming.plants.Plant;
7import com.runehive.content.skill.impl.farming.zones.FarmingZone;
8import com.runehive.game.world.Interactable;
9import com.runehive.game.world.entity.mob.player.Player;
10
11/**
12 * An implementation of an allotment patch.
13 *
14 * @author Michael | Chex
15 */
16public class AllotmentPatch extends WaterablePatch {
17
18 /** The minimum amount of produce to harvest, */
19 private static final int START_HARVEST_AMOUNT = 3;
20
21 /** The maximum amount of produce to harvest, */
22 private static final int END_HARVEST_AMOUNT = 56;
23
24 /** The flower patch that can protect this patch from disease. */
25 private final FlowerPatch flower;
26
27 /**
28 * Constructs a new {@link AllotmentPatch}.
29 *
30 * @param player the player that owns this patch
31 * @param zone the zone this patch belongs to
32 * @param flower the protective flower patch
33 * @param boundaries the boundaries of this patch
34 */
39
40 /**
41 * Gets an {@link Allotment} type for a seed item id.
42 *
43 * @param seedId the seed item id
44 * @return the allotment for the seed
45 */
46 public Plant plantForSeed(int seedId) {
47 return Allotment.forId(seedId);
48 }
49
50 /* @Override
51 public boolean rollDisease() {
52 if (flower == null || !flower.isGrowing()) {
53 return super.rollDisease();
54 }
55 return !flower.protectsDisease(plant.getFlowerProtect()) && super.rollDisease();
56 }
57*/
58 @Override
59 protected int getMinAmount() {
61 }
62
63 @Override
64 protected int getMaxAmount() {
65 return END_HARVEST_AMOUNT;
66 }
67
68 @Override
69 protected int animation() {
71 }
72
73}
WaterablePatch(Player player, FarmingZone zone, Interactable[] boundaries)
Constructs a new WaterablePatch object.
static final int START_HARVEST_AMOUNT
The minimum amount of produce to harvest,.
AllotmentPatch(Player player, FarmingZone zone, FlowerPatch flower, Interactable[] boundaries)
Constructs a new AllotmentPatch.
Plant plantForSeed(int seedId)
Gets an Allotment type for a seed item id.
final FlowerPatch flower
The flower patch that can protect this patch from disease.
static final int END_HARVEST_AMOUNT
The maximum amount of produce to harvest,.
A WaterablePatch that can grow flowers and scarecrows for battling disease on an AllotmentPatch.
This class represents a character controlled by a player.
Definition Player.java:125
An object implementing Interactable has uses.