RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
AllotmentPatch.java
1package com.osroyale.content.skill.impl.farming.patches.impl;
2
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.Allotment;
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.entity.mob.player.Player;
10
48
49public class AllotmentPatch extends WaterablePatch {
50
52 private static final int START_HARVEST_AMOUNT = 3;
53
55 private static final int END_HARVEST_AMOUNT = 56;
56
58 private final FlowerPatch flower;
59
68 public AllotmentPatch(Player player, FarmingZone zone, FlowerPatch flower, Interactable[] boundaries) {
69 super(player, zone, boundaries);
70 this.flower = flower;
71 }
72
79 public Plant plantForSeed(int seedId) {
80 return Allotment.forId(seedId);
81 }
82
83 /* @Override
84 public boolean rollDisease() {
85 if (flower == null || !flower.isGrowing()) {
86 return super.rollDisease();
87 }
88 return !flower.protectsDisease(plant.getFlowerProtect()) && super.rollDisease();
89 }
90*/
91 @Override
92 protected int getMinAmount() {
93 return START_HARVEST_AMOUNT;
94 }
95
96 @Override
97 protected int getMaxAmount() {
98 return END_HARVEST_AMOUNT;
99 }
100
101 @Override
102 protected int animation() {
103 return FarmingConstants.PICKING_VEGETABLE_ANIM;
104 }
105
106}
WaterablePatch(Player player, FarmingZone zone, Interactable[] boundaries)
AllotmentPatch(Player player, FarmingZone zone, FlowerPatch flower, Interactable[] boundaries)