Skip to content

Commit a6283bc

Browse files
committed
feat: dwarven mines NPCs
1 parent 6ed49d5 commit a6283bc

24 files changed

Lines changed: 1983 additions & 124 deletions
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
package net.swofty.type.dwarvenmines.gui;
2+
3+
import net.minestom.server.event.inventory.InventoryPreClickEvent;
4+
import net.minestom.server.inventory.InventoryType;
5+
import net.minestom.server.item.ItemStack;
6+
import net.minestom.server.item.Material;
7+
import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI;
8+
import net.swofty.type.generic.gui.inventory.ItemStackCreator;
9+
import net.swofty.type.generic.gui.inventory.item.GUIClickableItem;
10+
import net.swofty.type.generic.gui.inventory.item.GUIItem;
11+
import net.swofty.type.generic.user.HypixelPlayer;
12+
13+
public class GUIGuide extends HypixelInventoryGUI {
14+
15+
public GUIGuide() {
16+
super("Guide", InventoryType.CHEST_6_ROW);
17+
}
18+
19+
@Override
20+
public void onOpen(InventoryGUIOpenEvent e) {
21+
fill(FILLER_ITEM);
22+
set(new GUIItem(11) {
23+
@Override
24+
public ItemStack.Builder getItem(HypixelPlayer player) {
25+
return ItemStackCreator.getStack(
26+
"§aMithril §8and §9᠅ Powder",
27+
Material.PRISMARINE_CRYSTALS,
28+
1,
29+
"§8 ■ §7All of the veins on this island are",
30+
" §7mineable.",
31+
"§8 ■ §7The center of §fMithril §7veins are more",
32+
" §7pure and thus drop more Mithril,",
33+
" §7while the outer edges of the vein",
34+
" §7drop the least!",
35+
"§8 ■ §7Mining Mithril is the main source of",
36+
" §7gaining §2Mithril Powder§7, which is useful",
37+
" §7in the §5Heart of the Mountain§7."
38+
);
39+
}
40+
});
41+
set(new GUIItem(13) {
42+
@Override
43+
public ItemStack.Builder getItem(HypixelPlayer player) {
44+
return ItemStackCreator.getStack(
45+
"§6Commissions",
46+
Material.WRITABLE_BOOK,
47+
1,
48+
"§8 ■ §7The §6§lKing §7can be found in the §bRoyal",
49+
" §bPalace§7. He's pretty famous around",
50+
" §7here.",
51+
"§8 ■ §7If you do §9Commissions §7for the King",
52+
" §7you will be rewarded with §5HOTM Exp§7!",
53+
"§8 ■ §7You can always see your active",
54+
" §7Commissions in the §atab list§7.",
55+
"§8 ■ §7When you are done with a Commission,",
56+
" §7talk to the King to get new ones!",
57+
"§8 ■ §7Your first §a4 §7Commissions of the day",
58+
" §7reward a lot more HOTM Exp!"
59+
);
60+
}
61+
});
62+
set(new GUIItem(15) {
63+
@Override
64+
public ItemStack.Builder getItem(HypixelPlayer player) {
65+
return ItemStackCreator.getStackHead(
66+
"§5Heart of the Mountain",
67+
"86f06eaa3004aeed09b3d5b45d976de584e691c0e9cade133635de93d23b9edb",
68+
1,
69+
"§8 ■ §7You can level up your §5Heart of the",
70+
" §5Mountain §7by doing §9Commissions§7.",
71+
"§8 ■ §7Spend your §5Token of the Mountain",
72+
" §7wisely to unlock §aPerks §7and §aPickaxe",
73+
" §aAbilities§7!",
74+
"§8 ■ §7Most of these Perks can be",
75+
" §7upgraded using §9Powder§7! Some are",
76+
" §7only one-time unlocks.",
77+
"§8 ■ §7If you are not happy with your",
78+
" §7setup, you can reset your HOTM for",
79+
" §7a price."
80+
);
81+
}
82+
});
83+
set(new GUIItem(28) {
84+
@Override
85+
public ItemStack.Builder getItem(HypixelPlayer player) {
86+
return ItemStackCreator.getStack(
87+
"§aMining",
88+
Material.DIAMOND_PICKAXE,
89+
1,
90+
"§8 ■ §7Your §6⸕ Mining Speed §7stat increases",
91+
" §7the speed at which you can mine.",
92+
" §7Increase your §6⸕ Mining Speed §7by",
93+
" §7using better pickaxes or §aDrills§7.",
94+
"§8 ■ §7Certain ores are tougher, requiring",
95+
" §7pickaxes with a higher §aBreaking",
96+
" §aPower §7to mine!",
97+
"§8 ■ §7Talk to §5Bubu §7at the nearby shop to",
98+
" §7buy your first §aMithril Pickaxe§7!",
99+
"§8 ■ §7If you want better pickaxes with",
100+
" §7higher §6⸕ Mining Speed§7, you will need",
101+
" §7to unlock the §6Forge §7down the road."
102+
);
103+
}
104+
});
105+
set(new GUIItem(30) {
106+
@Override
107+
public ItemStack.Builder getItem(HypixelPlayer player) {
108+
return ItemStackCreator.getStack(
109+
"§6The Forge",
110+
Material.FURNACE,
111+
1,
112+
"§8 ■ §7The §6Forge §7allows you to §asmelt §7and",
113+
" §acast §7higher quality items.",
114+
"§8 ■ §7You start with §a2 §7Forge slots and can",
115+
" §7currently unlock up to §a7§7!",
116+
"§8 ■ §7Forging takes time. You'll need to",
117+
" §7plan things out to get the most",
118+
" §7efficiency out of it.",
119+
"§8 ■ §7You can unlock new Forging options",
120+
" §7- including more slots and faster",
121+
" §7speeds - by leveling up your §5HOTM."
122+
);
123+
}
124+
});
125+
set(new GUIItem(32) {
126+
@Override
127+
public ItemStack.Builder getItem(HypixelPlayer player) {
128+
return ItemStackCreator.getStack(
129+
"§bDwarven Rail Co.",
130+
Material.MINECART,
131+
1,
132+
"§8 ■ §7The brand new fast travel system",
133+
" §7that spans the whole of the §6Dwarven",
134+
" §6Mines§7.",
135+
"§8 ■ §7Many §bTicket Masters §7now dot the",
136+
" §7cave and will offer to take you to",
137+
" §7different §astations §7in return for",
138+
" §6coins§7.",
139+
"§8 ■ §7The cost of a §2journey §7will vary",
140+
" §7depending on how far away you are",
141+
" §7from the §astation§7.",
142+
"§8 ■ §7Once you have paid a §8Minecart §7will",
143+
" §7appear on the tracks to take you to",
144+
" §7your destination's §astation§7.",
145+
"§8 ■ §7But be careful, the §6Dwarves §7run a",
146+
" §7tight schedule and if you miss your",
147+
" §8Minecart §7it will leave without you. Oh",
148+
" §7and §cno refunds§7!"
149+
);
150+
}
151+
});
152+
set(new GUIItem(34) {
153+
@Override
154+
public ItemStack.Builder getItem(HypixelPlayer player) {
155+
return ItemStackCreator.getStackHead(
156+
"§5Crystal Hollows",
157+
"d159b03243be18a14f3eae763c4565c78f1f339a8742d26fde541be59b7de07",
158+
1,
159+
"§8 ■ §7The entrance to the §5Crystal Hollows",
160+
" §7is a newly excavated area at the",
161+
" §7back of the §bDwarven Village",
162+
" §7accessible only via §8Minecart§7.",
163+
"§8 ■ §7Speak to §5Gwendolyn §7next to the",
164+
" §7entrance to gain access to the cave",
165+
" §7system!",
166+
"§8 ■ §dGemstones §7are a precious resource",
167+
" §7in the §5Crystal Hollows §7so be sure to",
168+
" §7be on the lookout for them whilst",
169+
" §7visiting to §bupgrade §7your gear at",
170+
" §aGeo's Shop§7!",
171+
"§8 ■ §7Make sure to take lots of §6Torches",
172+
" §7and watch out for §9cave-ins §7- they",
173+
" §7are incredibly §cdangerous §7and tend",
174+
" §7to happen every few hours."
175+
);
176+
}
177+
});
178+
set(GUIClickableItem.getCloseItem(49));
179+
updateItemStacks(getInventory(), getPlayer());
180+
}
181+
182+
@Override
183+
public boolean allowHotkeying() {
184+
return false;
185+
}
186+
187+
@Override
188+
public void onBottomClick(InventoryPreClickEvent e) {
189+
e.setCancelled(true);
190+
}
191+
}
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
package net.swofty.type.dwarvenmines.gui.fragilis;
2+
3+
import net.minestom.server.event.inventory.InventoryPreClickEvent;
4+
import net.minestom.server.inventory.InventoryType;
5+
import net.minestom.server.item.ItemStack;
6+
import net.minestom.server.item.Material;
7+
import net.swofty.type.generic.gui.inventory.HypixelInventoryGUI;
8+
import net.swofty.type.generic.gui.inventory.ItemStackCreator;
9+
import net.swofty.type.generic.gui.inventory.item.GUIClickableItem;
10+
import net.swofty.type.generic.gui.inventory.item.GUIItem;
11+
import net.swofty.type.generic.user.HypixelPlayer;
12+
13+
// TODO: hardcoded
14+
public class GUIBlocks extends HypixelInventoryGUI {
15+
16+
public GUIBlocks() {
17+
super("Blocks", InventoryType.CHEST_6_ROW);
18+
}
19+
20+
@Override
21+
public void onOpen(InventoryGUIOpenEvent e) {
22+
border(FILLER_ITEM);
23+
set(new GUIItem(4) {
24+
@Override
25+
public ItemStack.Builder getItem(HypixelPlayer player) {
26+
return ItemStackCreator.getStack(
27+
"§9Blocks",
28+
Material.BOOK,
29+
1,
30+
"§8Block Classification",
31+
"",
32+
"§7These blocks are affected by: ",
33+
"§8 - §6☘ Block Fortune",
34+
"§8 - §6☘ Mining Fortune",
35+
"§8 - §e▚ Mining Spread"
36+
);
37+
}
38+
});
39+
set(new GUIItem(10) {
40+
@Override
41+
public ItemStack.Builder getItem(HypixelPlayer player) {
42+
return ItemStackCreator.getStack(
43+
"§9Cobblestone",
44+
Material.COBBLESTONE,
45+
1,
46+
"§8Block"
47+
);
48+
}
49+
});
50+
set(new GUIItem(11) {
51+
@Override
52+
public ItemStack.Builder getItem(HypixelPlayer player) {
53+
return ItemStackCreator.getStack(
54+
"§9Stone",
55+
Material.STONE,
56+
1,
57+
"§8Block"
58+
);
59+
}
60+
});
61+
set(new GUIItem(12) {
62+
@Override
63+
public ItemStack.Builder getItem(HypixelPlayer player) {
64+
return ItemStackCreator.getStack(
65+
"§9Sand",
66+
Material.SAND,
67+
1,
68+
"§8Block"
69+
);
70+
}
71+
});
72+
set(new GUIItem(13) {
73+
@Override
74+
public ItemStack.Builder getItem(HypixelPlayer player) {
75+
return ItemStackCreator.getStack(
76+
"§9Gravel",
77+
Material.GRAVEL,
78+
1,
79+
"§8Block"
80+
);
81+
}
82+
});
83+
set(new GUIItem(14) {
84+
@Override
85+
public ItemStack.Builder getItem(HypixelPlayer player) {
86+
return ItemStackCreator.getStack(
87+
"§9Ice",
88+
Material.ICE,
89+
1,
90+
"§8Block"
91+
);
92+
}
93+
});
94+
set(new GUIItem(15) {
95+
@Override
96+
public ItemStack.Builder getItem(HypixelPlayer player) {
97+
return ItemStackCreator.getStack(
98+
"§9End Stone",
99+
Material.END_STONE,
100+
1,
101+
"§8Block"
102+
);
103+
}
104+
});
105+
set(new GUIItem(16) {
106+
@Override
107+
public ItemStack.Builder getItem(HypixelPlayer player) {
108+
return ItemStackCreator.getStack(
109+
"§9Obsidian",
110+
Material.OBSIDIAN,
111+
1,
112+
"§8Block"
113+
);
114+
}
115+
});
116+
set(new GUIItem(19) {
117+
@Override
118+
public ItemStack.Builder getItem(HypixelPlayer player) {
119+
return ItemStackCreator.getStack(
120+
"§9Netherrack",
121+
Material.NETHERRACK,
122+
1,
123+
"§8Block"
124+
);
125+
}
126+
});
127+
set(new GUIItem(20) {
128+
@Override
129+
public ItemStack.Builder getItem(HypixelPlayer player) {
130+
return ItemStackCreator.getStack(
131+
"§9Glowstone",
132+
Material.GLOWSTONE,
133+
1,
134+
"§8Block"
135+
);
136+
}
137+
});
138+
set(new GUIItem(21) {
139+
@Override
140+
public ItemStack.Builder getItem(HypixelPlayer player) {
141+
return ItemStackCreator.getStack(
142+
"§9Red Sand",
143+
Material.RED_SAND,
144+
1,
145+
"§8Block"
146+
);
147+
}
148+
});
149+
set(new GUIItem(22) {
150+
@Override
151+
public ItemStack.Builder getItem(HypixelPlayer player) {
152+
return ItemStackCreator.getStack(
153+
"§9Mycelium",
154+
Material.MYCELIUM,
155+
1,
156+
"§8Block"
157+
);
158+
}
159+
});
160+
set(new GUIItem(23) {
161+
@Override
162+
public ItemStack.Builder getItem(HypixelPlayer player) {
163+
return ItemStackCreator.getStack(
164+
"§9Hard Stone",
165+
Material.STONE,
166+
1,
167+
"§8Block",
168+
"",
169+
"§7Properties",
170+
"§7 Breaking Power: §24",
171+
"§7 Block Strength: §e50"
172+
);
173+
}
174+
});
175+
set(GUIClickableItem.getGoBackItem(48, new GUIHandyBlockGuide()));
176+
set(GUIClickableItem.getCloseItem(49));
177+
updateItemStacks(getInventory(), getPlayer());
178+
}
179+
180+
@Override
181+
public boolean allowHotkeying() {
182+
return false;
183+
}
184+
185+
@Override
186+
public void onBottomClick(InventoryPreClickEvent e) {
187+
e.setCancelled(true);
188+
}
189+
}

0 commit comments

Comments
 (0)