RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
AllotmentPatch.java
1
package
com.osroyale.content.skill.impl.farming.patches.impl;
2
3
import
com.osroyale.content.skill.impl.farming.FarmingConstants;
4
import
com.osroyale.content.skill.impl.farming.patches.WaterablePatch;
5
import
com.osroyale.content.skill.impl.farming.plants.Allotment;
6
import
com.osroyale.content.skill.impl.farming.plants.Plant;
7
import
com.osroyale.content.skill.impl.farming.zones.FarmingZone;
8
import
com.osroyale.game.world.Interactable;
9
import
com.osroyale.game.world.entity.mob.player.Player;
10
48
49
public
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
}
com.osroyale.content.skill.impl.farming.FarmingConstants
Definition
FarmingConstants.java:27
com.osroyale.content.skill.impl.farming.patches.WaterablePatch.WaterablePatch
WaterablePatch(Player player, FarmingZone zone, Interactable[] boundaries)
Definition
WaterablePatch.java:56
com.osroyale.content.skill.impl.farming.patches.impl.AllotmentPatch.animation
int animation()
Definition
AllotmentPatch.java:102
com.osroyale.content.skill.impl.farming.patches.impl.AllotmentPatch.getMaxAmount
int getMaxAmount()
Definition
AllotmentPatch.java:97
com.osroyale.content.skill.impl.farming.patches.impl.AllotmentPatch.getMinAmount
int getMinAmount()
Definition
AllotmentPatch.java:92
com.osroyale.content.skill.impl.farming.patches.impl.AllotmentPatch.plantForSeed
Plant plantForSeed(int seedId)
Definition
AllotmentPatch.java:79
com.osroyale.content.skill.impl.farming.patches.impl.AllotmentPatch.AllotmentPatch
AllotmentPatch(Player player, FarmingZone zone, FlowerPatch flower, Interactable[] boundaries)
Definition
AllotmentPatch.java:68
com.osroyale.content.skill.impl.farming.patches.impl.FlowerPatch
Definition
FlowerPatch.java:54
com.osroyale.content.skill.impl.farming.zones.FarmingZone
Definition
FarmingZone.java:58
com.osroyale.game.world.entity.mob.player.Player
Definition
Player.java:162
com.osroyale.content.skill.impl.farming.plants.Allotment
Definition
Allotment.java:21
com.osroyale.game.world.Interactable
Definition
Interactable.java:10