RuneHive-Game
Loading...
Searching...
No Matches
BuildableObject.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.construction;
2
3import com.runehive.game.world.items.Item;
4
5import java.util.ArrayList;
6import java.util.List;
7
8/**
9 * Holds all the construction buildable object.
10 *
11 * @author Daniel
12 */
13public enum BuildableObject {
14 /* Main object. */
15 CRATE("Crate", BuildableType.MAIN_OBJECT, 1, 100, 1, new Item(960, 1)),
16 STOOL("Stool", BuildableType.MAIN_OBJECT, 1102, 250, 5, new Item(960, 2)),
17 BOOKCASE("Bookcase", BuildableType.MAIN_OBJECT, 12282, 450, 8, new Item(960, 4)),
18 MARKET_STALL("Market stall", BuildableType.MAIN_OBJECT, 1539, 600, 9, new Item(960, 3), new Item(8790, 1)),
19 COFFIN("Coffin", BuildableType.MAIN_OBJECT, 398, 750, 10, new Item(960, 2), new Item(2353, 1), new Item(1325, 2)),
20 TABLE("Table", BuildableType.MAIN_OBJECT, 595, 900, 15, new Item(960, 5)),
21 PILLAR("Pillar", BuildableType.MAIN_OBJECT, 7016, 975, 18, new Item(2351, 5)),
22 CHAIR("Chair", BuildableType.MAIN_OBJECT, 6195, 1000, 22, new Item(2351, 3), new Item(8790, 1)),
23 KITCHEN_SINK("Kitchen sink", BuildableType.MAIN_OBJECT, 12279, 2500, 40, new Item(960, 2), new Item(2353, 3)),
24 GRANDFATHER_CLOCK("Grandfather clock", BuildableType.MAIN_OBJECT, 12293, 2750, 45, new Item(960, 3), new Item(2357)),
25 PRAYER_ALTAR("Prayer altar", BuildableType.MAIN_OBJECT, 409, 4000, 50, new Item(960, 3), new Item(1718, 1)),
26 CRYSTAL_CHEST("Crystal chest", BuildableType.MAIN_OBJECT, 2191, 5000, 75, new Item(960, 5), new Item(989, 10)),
27 BANK_BOOTH("Bank booth", BuildableType.MAIN_OBJECT, 11744, 10000, 90, new Item(20527, 250000), new Item(960, 10), new Item(1775, 5)),
28
29 /* Skill object. */
30 TREE("Tree", BuildableType.SKILL_OBJECT, 1278, 950, 15, new Item(8419, 1), new Item(1511, 5)),
31 OAK_TREE("Oak tree", BuildableType.SKILL_OBJECT, 11756, 1250, 25, new Item(8421, 1), new Item(1521, 5)),
32
33 /* Miscellaneous object. */
34
35
36 ;
37
38 private final String name;
39 private final BuildableType type;
40 private final int object;
41 private final int level;
42 private final int experience;
43 private final Item[] items;
44
45 BuildableObject(String name, BuildableType type, int object, int experience, int level, Item... items) {
46 this.name = name;
47 this.type = type;
48 this.object = object;
49 this.level = level;
50 this.experience = experience;
51 this.items = items;
52 }
53
54 public String getName() {
55 return name;
56 }
57
59 return type;
60 }
61
62 public int getLevel() {
63 return level;
64 }
65
66 public int getExperience() {
67 return experience;
68 }
69
70 public int getObject() {
71 return object;
72 }
73
74 public Item[] getItems() {
75 return items;
76 }
77
78 public static List<BuildableObject> get(BuildableType type) {
79 List<BuildableObject> object_list = new ArrayList<>();
80 for (BuildableObject object : values()) {
81 if (object.type == type) {
82 object_list.add(object);
83 }
84 }
85 return object_list;
86 }
87}
The container class that represents an item that can be interacted with.
Definition Item.java:21
BuildableObject(String name, BuildableType type, int object, int experience, int level, Item... items)