RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.consume.FoodData Enum Reference

Holds all the food data. More...

Public Member Functions

 FoodData (int id, int heal, String name)
 The different consumables.
 FoodData (int id, int parent, int replacement, int heal, String name)
 The different consumables.
int getHeal ()
 Gets the healing amount of the consumable.
int getId ()
 Gets the id of the consumable.
String getName ()
 Gets the name of the consumable.
int getReplacement ()
 Gets the replacement id.
boolean isFast ()
 Checks if this food is fast.

Static Public Member Functions

static int anglerfishHeal (Player player)
static Optional< FoodDataforId (int id)
 Gets the food data based on the item identification.

Public Attributes

 ANCHOVIES =(319, 1, "Anchovies")
 ANCHOVY_PIZZA =(2297, 2297, 2299, 9, "Anchovy Pizza")
 ANGLERFISH =(13441, 22, "Anglerfish")
 APPLE_PIE =(2323, 2323, 2335, 7, "Apple Pie")
 BAKED_POTATO =(6701, 4, "Baked Potato")
 BANANA =(1963, 2, "Banana")
 BANDAGES =(4049, 3, "Bandages")
 BASS =(365, 13, "Bass")
 BEER =(1917, 1, "Beer")
 BREAD =(2309, 5, "Bread")
 CABBAGE =(1965, 1, "Cabbage")
 CAKE =(1891, 4, "Cake")
 CHILLI_POTATO =(7054, 14, "Chilli Potato")
 CHOCOLATE_CAKE =(1897, 5, "Chocolate Cake")
 CHOCOLATE_SLICE =(1901, 5, "Chocolate Slice")
 COD =(339, 7, "Cod")
 COOKED_KARAMBWAN =(3144, -1, -1, 18, "Cooked Karambwan")
 DARK_CRAB =(11936, 22, "Dark Crab")
 EASTER_EGG =(7928, 1, "Easter Egg")
 EASTER_EGG1 =(1961, 12, "Easter Egg")
 EASTER_EGG2 =(7929, 1, "Easter Egg")
 EASTER_EGG3 =(7930, 1, "Easter Egg")
 EASTER_EGG4 =(7931, 1, "Easter Egg")
 EASTER_EGG5 =(7932, 1, "Easter Egg")
 EASTER_EGG6 =(7933, 1, "Easter Egg")
 EGG_POTATO =(7056, 16, "Egg Potato")
 GREENMANS_ALE =(1909, 1, "Greenman's Ale")
 HALF_ANCHOVY_PIZZA =(2299, 2297, -1, 9, "1/2 Anchovy Pizza")
 HALF_APPLE_PIE =(2335, 2323, -1, 7, "Half Apple Pie")
 HALF_CHOCOLATE_CAKE =(1899, 5, "2/3 Chocolate Cake")
 HALF_JUG_OF_WINE =(1989, 7, "Half Full Wine Jug")
 HALF_MEAT_PIE =(2331, 2327, -1, 6, "Half Meat Pie")
 HALF_MEAT_PIZZA =(2295, 2293, -1, 8, "1/2 Meat Pizza")
 HALF_PINEAPPLE_PIZZA =(2303, 2301, -1, 11, "1/2 Pineapple Pizza")
 HALF_PLAIN_PIZZA =(2291, 2289, -1, 7, "1/2 Plain pizza")
 HALF_REDBERRY_PIE =(2333, 2325, -1, 5, "Half Redberry Pie")
 HALF_SUMMER_PIE =(7220, 7218, -1, 11, "Half Summer Pie")
 HERRING =(347, 5, "Herring")
 LOBSTER =(379, 12, "Lobster")
 MANTA =(391, 22, "Manta Ray")
 MEAT_PIE =(2327, 2327, 2331, 6, "Meat Pie")
 MEAT_PIZZA =(2293, 2293, 2295, 8, "Meat Pizza")
 MONKFISH =(7946, 16, "Monkfish")
 MUSHROOM_POTATO =(7058, 20, "Mushroom Potato")
 ORANGE =(2108, 2, "Orange")
 PEACH =(6883, 8, "Peach")
 PIKE =(351, 8, "Pike")
 PINEAPPLE_CHUNKS =(2116, 2, "Pineapple Chunks")
 PINEAPPLE_PIZZA =(2301, 2301, 2303, 11, "Pineapple Pizza")
 PINEAPPLE_RINGS =(2118, 2, "Pineapple Rings")
 PLAIN_PIZZA =(2289, 2289, 2291, 7, "Plain Pizza")
 POT_OF_CREAM =(2130, 1, "Pot of cream")
 POTATO =(1942, 1, "Potato")
 POTATO_WITH_BUTTER =(6703, 14, "Potato with Butter")
 POTATO_WITH_CHEESE =(6705, 16, "Potato with Cheese")
 PUMPKIN =(1959, 14, "Pumpkin")
 PURPLE_SWEETS =(10476, 9, "Purple Sweets")
 REDBERRY_PIE =(2325, 2325, 2333, 5, "Redberry Pie")
 SALMON =(329, 9, "Salmon")
 SARDINE =(325, 4, "Sardine")
 SEA_TURTLE =(397, 21, "Sea Turtle")
 SHARK =(385, 20, "Shark")
 SHRIMPS =(315, 3, "Shrimps")
 SLICED_BANANA =(3162, 2, "Sliced banana")
 SUMMER_PIE =(7218, 7218, 7220, 11, "Summer Pie")
 SWORDFISH =(373, 14, "Swordfish")
 TROUT =(333, 7, "Trout")
 TUNA =(361, 10, "Tuna")
 TUNA_POTATO =(7060, 22, "Tuna Potato")
 UGTHANKI_KEBAB =(1883, 2, "Ugthanki kebab")
 WINE =(1993, 11, "Wine")

Private Attributes

final int heal
 The amount of health received after consuming the item.
final int id
 The id of the consumable item.
final String name
 The name of the consumable item.
final int parent
 The parent food id.
final int replacement
 The replacement food id.

Detailed Description

Holds all the food data.

Author
Daniel.

Definition at line 14 of file FoodData.java.

Constructor & Destructor Documentation

◆ FoodData() [1/2]

com.runehive.content.consume.FoodData.FoodData ( int id,
int parent,
int replacement,
int heal,
String name )

The different consumables.

Parameters
idThe id of the item.
healThe amount of health received after consuming the item.
nameThe name of the consumable item.

Definition at line 109 of file FoodData.java.

109 {
110 this.id = id;
111 this.parent = parent;
112 this.replacement = replacement;
113 this.heal = heal;
114 this.name = name;
115 }

References heal, id, name, parent, and replacement.

◆ FoodData() [2/2]

com.runehive.content.consume.FoodData.FoodData ( int id,
int heal,
String name )

The different consumables.

Parameters
idThe id of the item.
healThe amount of health received after consuming the item.
nameThe name of the consumable item.

Definition at line 124 of file FoodData.java.

124 {
125 this(id, id, -1, heal, name);
126 }

References heal, id, and name.

Member Function Documentation

◆ anglerfishHeal()

int com.runehive.content.consume.FoodData.anglerfishHeal ( Player player)
static

Definition at line 139 of file FoodData.java.

139 {
140 int hitpoints = player.skills.getMaxLevel(Skill.HITPOINTS);
141 if (hitpoints >= 10 && hitpoints <= 19)
142 return 3;
143 if (hitpoints >= 20 && hitpoints <= 24)
144 return 4;
145 if (hitpoints >= 25 && hitpoints <= 29)
146 return 6;
147 if (hitpoints >= 30 && hitpoints <= 39)
148 return 7;
149 if (hitpoints >= 40 && hitpoints <= 49)
150 return 8;
151 if (hitpoints >= 50 && hitpoints <= 59)
152 return 11;
153 if (hitpoints >= 60 && hitpoints <= 69)
154 return 12;
155 if (hitpoints >= 70 && hitpoints <= 74)
156 return 13;
157 if (hitpoints >= 75 && hitpoints <= 79)
158 return 15;
159 if (hitpoints >= 80 && hitpoints <= 89)
160 return 16;
161 if (hitpoints >= 90 && hitpoints <= 92)
162 return 17;
163 if (hitpoints >= 93)
164 return 22;
165 return 0;
166 }

References com.runehive.game.world.entity.skill.SkillManager.getMaxLevel(), com.runehive.game.world.entity.skill.Skill.HITPOINTS, and com.runehive.game.world.entity.mob.Mob.skills.

Here is the call graph for this function:

◆ forId()

Optional< FoodData > com.runehive.content.consume.FoodData.forId ( int id)
static

Gets the food data based on the item identification.

Parameters
idThe item identification.
Returns
The food data.

Definition at line 134 of file FoodData.java.

134 {
135 return Arrays.stream(values()).filter(a -> a.id == id).findFirst();
136 }

Referenced by com.runehive.content.bot.objective.impl.RestockObjective.init().

Here is the caller graph for this function:

◆ getHeal()

int com.runehive.content.consume.FoodData.getHeal ( )

Gets the healing amount of the consumable.

Definition at line 184 of file FoodData.java.

184 {
185 return heal;
186 }

References heal.

◆ getId()

int com.runehive.content.consume.FoodData.getId ( )

Gets the id of the consumable.

Definition at line 169 of file FoodData.java.

169 {
170 return id;
171 }

References id.

◆ getName()

String com.runehive.content.consume.FoodData.getName ( )

Gets the name of the consumable.

Definition at line 189 of file FoodData.java.

189 {
190 return name;
191 }

References name.

◆ getReplacement()

int com.runehive.content.consume.FoodData.getReplacement ( )

Gets the replacement id.

Definition at line 174 of file FoodData.java.

174 {
175 return replacement;
176 }

References replacement.

◆ isFast()

boolean com.runehive.content.consume.FoodData.isFast ( )

Checks if this food is fast.

Definition at line 179 of file FoodData.java.

179 {
180 return replacement != -1 || parent != id;
181 }

References id, parent, and replacement.

Member Data Documentation

◆ ANCHOVIES

com.runehive.content.consume.FoodData.ANCHOVIES =(319, 1, "Anchovies")

Definition at line 48 of file FoodData.java.

◆ ANCHOVY_PIZZA

com.runehive.content.consume.FoodData.ANCHOVY_PIZZA =(2297, 2297, 2299, 9, "Anchovy Pizza")

Definition at line 53 of file FoodData.java.

◆ ANGLERFISH

com.runehive.content.consume.FoodData.ANGLERFISH =(13441, 22, "Anglerfish")

Definition at line 85 of file FoodData.java.

◆ APPLE_PIE

com.runehive.content.consume.FoodData.APPLE_PIE =(2323, 2323, 2335, 7, "Apple Pie")

Definition at line 58 of file FoodData.java.

◆ BAKED_POTATO

com.runehive.content.consume.FoodData.BAKED_POTATO =(6701, 4, "Baked Potato")

Definition at line 36 of file FoodData.java.

◆ BANANA

com.runehive.content.consume.FoodData.BANANA =(1963, 2, "Banana")

Definition at line 69 of file FoodData.java.

◆ BANDAGES

com.runehive.content.consume.FoodData.BANDAGES =(4049, 3, "Bandages")

Definition at line 82 of file FoodData.java.

◆ BASS

com.runehive.content.consume.FoodData.BASS =(365, 13, "Bass")

Definition at line 33 of file FoodData.java.

◆ BEER

com.runehive.content.consume.FoodData.BEER =(1917, 1, "Beer")

Definition at line 23 of file FoodData.java.

◆ BREAD

com.runehive.content.consume.FoodData.BREAD =(2309, 5, "Bread")

Definition at line 57 of file FoodData.java.

◆ CABBAGE

com.runehive.content.consume.FoodData.CABBAGE =(1965, 1, "Cabbage")

Definition at line 31 of file FoodData.java.

◆ CAKE

com.runehive.content.consume.FoodData.CAKE =(1891, 4, "Cake")

Definition at line 32 of file FoodData.java.

◆ CHILLI_POTATO

com.runehive.content.consume.FoodData.CHILLI_POTATO =(7054, 14, "Chilli Potato")

Definition at line 39 of file FoodData.java.

◆ CHOCOLATE_CAKE

com.runehive.content.consume.FoodData.CHOCOLATE_CAKE =(1897, 5, "Chocolate Cake")

Definition at line 45 of file FoodData.java.

◆ CHOCOLATE_SLICE

com.runehive.content.consume.FoodData.CHOCOLATE_SLICE =(1901, 5, "Chocolate Slice")

Definition at line 47 of file FoodData.java.

◆ COD

com.runehive.content.consume.FoodData.COD =(339, 7, "Cod")

Definition at line 34 of file FoodData.java.

◆ COOKED_KARAMBWAN

◆ DARK_CRAB

com.runehive.content.consume.FoodData.DARK_CRAB =(11936, 22, "Dark Crab")

Definition at line 84 of file FoodData.java.

◆ EASTER_EGG

com.runehive.content.consume.FoodData.EASTER_EGG =(7928, 1, "Easter Egg")

Definition at line 74 of file FoodData.java.

◆ EASTER_EGG1

com.runehive.content.consume.FoodData.EASTER_EGG1 =(1961, 12, "Easter Egg")

Definition at line 16 of file FoodData.java.

◆ EASTER_EGG2

com.runehive.content.consume.FoodData.EASTER_EGG2 =(7929, 1, "Easter Egg")

Definition at line 75 of file FoodData.java.

◆ EASTER_EGG3

com.runehive.content.consume.FoodData.EASTER_EGG3 =(7930, 1, "Easter Egg")

Definition at line 76 of file FoodData.java.

◆ EASTER_EGG4

com.runehive.content.consume.FoodData.EASTER_EGG4 =(7931, 1, "Easter Egg")

Definition at line 77 of file FoodData.java.

◆ EASTER_EGG5

com.runehive.content.consume.FoodData.EASTER_EGG5 =(7932, 1, "Easter Egg")

Definition at line 78 of file FoodData.java.

◆ EASTER_EGG6

com.runehive.content.consume.FoodData.EASTER_EGG6 =(7933, 1, "Easter Egg")

Definition at line 79 of file FoodData.java.

◆ EGG_POTATO

com.runehive.content.consume.FoodData.EGG_POTATO =(7056, 16, "Egg Potato")

Definition at line 38 of file FoodData.java.

◆ GREENMANS_ALE

com.runehive.content.consume.FoodData.GREENMANS_ALE =(1909, 1, "Greenman's Ale")

Definition at line 24 of file FoodData.java.

◆ HALF_ANCHOVY_PIZZA

com.runehive.content.consume.FoodData.HALF_ANCHOVY_PIZZA =(2299, 2297, -1, 9, "1/2 Anchovy Pizza")

Definition at line 54 of file FoodData.java.

◆ HALF_APPLE_PIE

com.runehive.content.consume.FoodData.HALF_APPLE_PIE =(2335, 2323, -1, 7, "Half Apple Pie")

Definition at line 59 of file FoodData.java.

◆ HALF_CHOCOLATE_CAKE

com.runehive.content.consume.FoodData.HALF_CHOCOLATE_CAKE =(1899, 5, "2/3 Chocolate Cake")

Definition at line 46 of file FoodData.java.

◆ HALF_JUG_OF_WINE

com.runehive.content.consume.FoodData.HALF_JUG_OF_WINE =(1989, 7, "Half Full Wine Jug")

Definition at line 18 of file FoodData.java.

◆ HALF_MEAT_PIE

com.runehive.content.consume.FoodData.HALF_MEAT_PIE =(2331, 2327, -1, 6, "Half Meat Pie")

Definition at line 64 of file FoodData.java.

◆ HALF_MEAT_PIZZA

com.runehive.content.consume.FoodData.HALF_MEAT_PIZZA =(2295, 2293, -1, 8, "1/2 Meat Pizza")

Definition at line 52 of file FoodData.java.

◆ HALF_PINEAPPLE_PIZZA

com.runehive.content.consume.FoodData.HALF_PINEAPPLE_PIZZA =(2303, 2301, -1, 11, "1/2 Pineapple Pizza")

Definition at line 56 of file FoodData.java.

◆ HALF_PLAIN_PIZZA

com.runehive.content.consume.FoodData.HALF_PLAIN_PIZZA =(2291, 2289, -1, 7, "1/2 Plain pizza")

Definition at line 50 of file FoodData.java.

◆ HALF_REDBERRY_PIE

com.runehive.content.consume.FoodData.HALF_REDBERRY_PIE =(2333, 2325, -1, 5, "Half Redberry Pie")

Definition at line 61 of file FoodData.java.

◆ HALF_SUMMER_PIE

com.runehive.content.consume.FoodData.HALF_SUMMER_PIE =(7220, 7218, -1, 11, "Half Summer Pie")

Definition at line 66 of file FoodData.java.

◆ heal

final int com.runehive.content.consume.FoodData.heal
private

The amount of health received after consuming the item.

Definition at line 97 of file FoodData.java.

Referenced by FoodData(), FoodData(), and getHeal().

◆ HERRING

com.runehive.content.consume.FoodData.HERRING =(347, 5, "Herring")

Definition at line 43 of file FoodData.java.

◆ id

final int com.runehive.content.consume.FoodData.id
private

The id of the consumable item.

Definition at line 88 of file FoodData.java.

Referenced by FoodData(), FoodData(), getId(), and isFast().

◆ LOBSTER

com.runehive.content.consume.FoodData.LOBSTER =(379, 12, "Lobster")

Definition at line 22 of file FoodData.java.

◆ MANTA

◆ MEAT_PIE

com.runehive.content.consume.FoodData.MEAT_PIE =(2327, 2327, 2331, 6, "Meat Pie")

Definition at line 63 of file FoodData.java.

◆ MEAT_PIZZA

com.runehive.content.consume.FoodData.MEAT_PIZZA =(2293, 2293, 2295, 8, "Meat Pizza")

Definition at line 51 of file FoodData.java.

◆ MONKFISH

com.runehive.content.consume.FoodData.MONKFISH =(7946, 16, "Monkfish")

Definition at line 29 of file FoodData.java.

◆ MUSHROOM_POTATO

com.runehive.content.consume.FoodData.MUSHROOM_POTATO =(7058, 20, "Mushroom Potato")

Definition at line 40 of file FoodData.java.

◆ name

final String com.runehive.content.consume.FoodData.name
private

The name of the consumable item.

Definition at line 100 of file FoodData.java.

Referenced by FoodData(), FoodData(), and getName().

◆ ORANGE

com.runehive.content.consume.FoodData.ORANGE =(2108, 2, "Orange")

Definition at line 71 of file FoodData.java.

◆ parent

final int com.runehive.content.consume.FoodData.parent
private

The parent food id.

Definition at line 91 of file FoodData.java.

Referenced by FoodData(), and isFast().

◆ PEACH

com.runehive.content.consume.FoodData.PEACH =(6883, 8, "Peach")

Definition at line 70 of file FoodData.java.

◆ PIKE

com.runehive.content.consume.FoodData.PIKE =(351, 8, "Pike")

Definition at line 67 of file FoodData.java.

◆ PINEAPPLE_CHUNKS

com.runehive.content.consume.FoodData.PINEAPPLE_CHUNKS =(2116, 2, "Pineapple Chunks")

Definition at line 73 of file FoodData.java.

◆ PINEAPPLE_PIZZA

com.runehive.content.consume.FoodData.PINEAPPLE_PIZZA =(2301, 2301, 2303, 11, "Pineapple Pizza")

Definition at line 55 of file FoodData.java.

◆ PINEAPPLE_RINGS

com.runehive.content.consume.FoodData.PINEAPPLE_RINGS =(2118, 2, "Pineapple Rings")

Definition at line 72 of file FoodData.java.

◆ PLAIN_PIZZA

com.runehive.content.consume.FoodData.PLAIN_PIZZA =(2289, 2289, 2291, 7, "Plain Pizza")

Definition at line 49 of file FoodData.java.

◆ POT_OF_CREAM

com.runehive.content.consume.FoodData.POT_OF_CREAM =(2130, 1, "Pot of cream")

Definition at line 81 of file FoodData.java.

◆ POTATO

com.runehive.content.consume.FoodData.POTATO =(1942, 1, "Potato")

Definition at line 35 of file FoodData.java.

◆ POTATO_WITH_BUTTER

com.runehive.content.consume.FoodData.POTATO_WITH_BUTTER =(6703, 14, "Potato with Butter")

Definition at line 68 of file FoodData.java.

◆ POTATO_WITH_CHEESE

com.runehive.content.consume.FoodData.POTATO_WITH_CHEESE =(6705, 16, "Potato with Cheese")

Definition at line 37 of file FoodData.java.

◆ PUMPKIN

com.runehive.content.consume.FoodData.PUMPKIN =(1959, 14, "Pumpkin")

Definition at line 17 of file FoodData.java.

◆ PURPLE_SWEETS

com.runehive.content.consume.FoodData.PURPLE_SWEETS =(10476, 9, "Purple Sweets")

Definition at line 80 of file FoodData.java.

◆ REDBERRY_PIE

com.runehive.content.consume.FoodData.REDBERRY_PIE =(2325, 2325, 2333, 5, "Redberry Pie")

Definition at line 60 of file FoodData.java.

◆ replacement

final int com.runehive.content.consume.FoodData.replacement
private

The replacement food id.

Definition at line 94 of file FoodData.java.

Referenced by FoodData(), getReplacement(), and isFast().

◆ SALMON

com.runehive.content.consume.FoodData.SALMON =(329, 9, "Salmon")

Definition at line 26 of file FoodData.java.

◆ SARDINE

com.runehive.content.consume.FoodData.SARDINE =(325, 4, "Sardine")

Definition at line 44 of file FoodData.java.

◆ SEA_TURTLE

com.runehive.content.consume.FoodData.SEA_TURTLE =(397, 21, "Sea Turtle")

Definition at line 30 of file FoodData.java.

◆ SHARK

com.runehive.content.consume.FoodData.SHARK =(385, 20, "Shark")

Definition at line 21 of file FoodData.java.

◆ SHRIMPS

com.runehive.content.consume.FoodData.SHRIMPS =(315, 3, "Shrimps")

Definition at line 42 of file FoodData.java.

◆ SLICED_BANANA

com.runehive.content.consume.FoodData.SLICED_BANANA =(3162, 2, "Sliced banana")

Definition at line 15 of file FoodData.java.

◆ SUMMER_PIE

com.runehive.content.consume.FoodData.SUMMER_PIE =(7218, 7218, 7220, 11, "Summer Pie")

Definition at line 65 of file FoodData.java.

◆ SWORDFISH

com.runehive.content.consume.FoodData.SWORDFISH =(373, 14, "Swordfish")

Definition at line 27 of file FoodData.java.

◆ TROUT

com.runehive.content.consume.FoodData.TROUT =(333, 7, "Trout")

Definition at line 25 of file FoodData.java.

◆ TUNA

com.runehive.content.consume.FoodData.TUNA =(361, 10, "Tuna")

Definition at line 28 of file FoodData.java.

◆ TUNA_POTATO

com.runehive.content.consume.FoodData.TUNA_POTATO =(7060, 22, "Tuna Potato")

Definition at line 41 of file FoodData.java.

◆ UGTHANKI_KEBAB

com.runehive.content.consume.FoodData.UGTHANKI_KEBAB =(1883, 2, "Ugthanki kebab")

Definition at line 62 of file FoodData.java.

◆ WINE

com.runehive.content.consume.FoodData.WINE =(1993, 11, "Wine")

Definition at line 19 of file FoodData.java.


The documentation for this enum was generated from the following file: