Skip to content

Commit b130ea9

Browse files
committed
feat: furniture
1 parent dba8bde commit b130ea9

8 files changed

Lines changed: 1463 additions & 53 deletions

File tree

configuration/skyblock/furniture/hexatorum.json

Lines changed: 1094 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
[
2+
{
3+
"type": "minecraft:item_display",
4+
"position": {
5+
"x": 23.5,
6+
"y": 64.8125,
7+
"z": -134.5
8+
},
9+
"rotation": {
10+
"yaw": 0.0,
11+
"pitch": 0.0
12+
},
13+
"translation": {
14+
"x": 0.0,
15+
"y": 0.0,
16+
"z": 0.0
17+
},
18+
"scale": {
19+
"x": 2.5,
20+
"y": 0.375,
21+
"z": 2.5
22+
},
23+
"leftRotation": {
24+
"x": 0.0,
25+
"y": 0.0,
26+
"z": 0.0,
27+
"w": 1.0
28+
},
29+
"rightRotation": {
30+
"x": 0.0,
31+
"y": 0.0,
32+
"z": 0.0,
33+
"w": 1.0
34+
},
35+
"item": {
36+
"id": "minecraft:player_head",
37+
"count": 1,
38+
"snbt": "{components:{\"minecraft:profile\":{id:[I;-1495162271,-1244969170,-1193721693,1287632350],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzRhZmE4ZDlmYWZkZjE2NjNmOTdmZDAzY2M5OWY4YWI3YzEyNGU2MzA4MjkxNjE2MTQ2ZmFlYTk3MzBjZTVlMCJ9fX0=\"}]}},count:1,id:\"minecraft:player_head\"}"
39+
}
40+
},
41+
{
42+
"type": "minecraft:item_display",
43+
"position": {
44+
"x": 23.5,
45+
"y": 64.625,
46+
"z": -134.25
47+
},
48+
"rotation": {
49+
"yaw": 0.0,
50+
"pitch": 0.0
51+
},
52+
"translation": {
53+
"x": 0.0,
54+
"y": 0.0,
55+
"z": 0.0
56+
},
57+
"scale": {
58+
"x": 0.99999994,
59+
"y": 0.9999999,
60+
"z": 0.9999999
61+
},
62+
"leftRotation": {
63+
"x": 0.7071068,
64+
"y": 0.0,
65+
"z": 0.0,
66+
"w": 0.7071068
67+
},
68+
"rightRotation": {
69+
"x": 0.0,
70+
"y": 0.0,
71+
"z": 0.0,
72+
"w": 1.0
73+
},
74+
"item": {
75+
"id": "minecraft:player_head",
76+
"count": 1,
77+
"snbt": "{components:{\"minecraft:profile\":{id:[I;1616993204,-407418342,-1522350402,-1409775599],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWM1NDAyOThhMDE3YjI1ZjljZmFlOTI4MWZlNWI1ODVkNzcwZGIxODUyYjczODA0ZDFiYjdjN2VlNTM3MzNhNCJ9fX0=\"}]}},count:1,id:\"minecraft:player_head\"}"
78+
}
79+
},
80+
{
81+
"type": "minecraft:item_display",
82+
"position": {
83+
"x": 23.5,
84+
"y": 64.5,
85+
"z": -134.5018541894038
86+
},
87+
"rotation": {
88+
"yaw": 0.0,
89+
"pitch": 0.0
90+
},
91+
"translation": {
92+
"x": 0.0,
93+
"y": 0.0,
94+
"z": 0.0
95+
},
96+
"scale": {
97+
"x": 0.7,
98+
"y": 1.0,
99+
"z": 0.7
100+
},
101+
"leftRotation": {
102+
"x": 0.0,
103+
"y": 0.0,
104+
"z": 0.0,
105+
"w": 1.0
106+
},
107+
"rightRotation": {
108+
"x": 0.0,
109+
"y": 0.0,
110+
"z": 0.0,
111+
"w": 1.0
112+
},
113+
"item": {
114+
"id": "minecraft:player_head",
115+
"count": 1,
116+
"snbt": "{components:{\"minecraft:profile\":{id:[I;-828360003,2037204845,-1129936185,205929491],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODNmYTBmYzA5OTZjZjc3MmQxZGJjMDUyYWEyNWIxMWRhYmFlOTc3ODIwYWY2NjNlZjAyMmQzY2UxZGI2MTEyMiJ9fX0=\"}]}},count:1,id:\"minecraft:player_head\"}"
117+
}
118+
}
119+
]

type.hub/src/main/java/net/swofty/type/hub/TypeHubLoader.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
import net.swofty.type.generic.tab.TablistManager;
2828
import net.swofty.type.generic.tab.TablistModule;
2929
import net.swofty.type.hub.darkauction.DarkAuctionDisplay;
30-
import net.swofty.type.hub.runes.RuneEntityImpl;
3130
import net.swofty.type.hub.tab.HubServerModule;
3231
import net.swofty.type.hub.util.HubMap;
3332
import net.swofty.type.skyblockgeneric.SkyBlockGenericLoader;
3433
import net.swofty.type.skyblockgeneric.darkauction.DarkAuctionHandler;
3534
import net.swofty.type.skyblockgeneric.entity.GlassDisplay;
35+
import net.swofty.type.skyblockgeneric.furniture.Furniture;
3636
import net.swofty.type.skyblockgeneric.item.SkyBlockItem;
3737
import net.swofty.type.skyblockgeneric.museum.MuseumDisplays;
3838
import net.swofty.type.skyblockgeneric.tabmodules.AccountInformationModule;
@@ -59,13 +59,7 @@ public void onInitialize(MinecraftServer server) {
5959

6060
@Override
6161
public void afterInitialize(MinecraftServer server) {
62-
RuneEntityImpl firstStone = new RuneEntityImpl(new Pos(-37.84375, 68.3125, -129.8125, 0, 0f), false);
63-
RuneEntityImpl secondStone = new RuneEntityImpl(new Pos(-37.21875, 68.3125, -129.8125, 0, 0f), false);
64-
RuneEntityImpl thirdStone = new RuneEntityImpl(new Pos(-37.21875, 68.3125, -129.1875, 0, 0f), false);
65-
RuneEntityImpl fourthStone = new RuneEntityImpl(new Pos(-37.84375, 68.3125, -129.1875, 0, 0f), false);
66-
RuneEntityImpl head = new RuneEntityImpl(new Pos(-37.65625, 69.09375, -129.34375, 45, 0f), true);
67-
Pos runePos = new Pos(-23.84375, 64.3125, -135.8125, 0, 0f);
68-
62+
Pos runePos = new Pos(23.5, 65.3, -135, 0, 0f);
6963
AtomicReference<Double> i = new AtomicReference<>(0D);
7064
MinecraftServer.getSchedulerManager().scheduleTask(() -> {
7165
List<Pos> locationsToDisplayParticle = new ArrayList<>();
@@ -142,6 +136,9 @@ public void afterInitialize(MinecraftServer server) {
142136

143137
HubMap hubMap = new HubMap();
144138
hubMap.placeItemFrames(HypixelConst.getInstanceContainer());
139+
140+
Furniture.load("hexatorum");
141+
Furniture.load("rune_table");
145142
}
146143

147144
@Override

type.hub/src/main/java/net/swofty/type/hub/events/ActionPlayerClicksOnRunePedestal.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
package net.swofty.type.hub.events;
22

3-
import net.minestom.server.event.player.PlayerEntityInteractEvent;
3+
import net.minestom.server.coordinate.BlockVec;
4+
import net.minestom.server.event.player.PlayerBlockInteractEvent;
45
import net.swofty.type.generic.event.EventNodes;
56
import net.swofty.type.generic.event.HypixelEvent;
67
import net.swofty.type.generic.event.HypixelEventClass;
78
import net.swofty.type.hub.gui.GUIRunicPedestal;
8-
import net.swofty.type.hub.runes.RuneEntityImpl;
99
import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer;
1010

1111
public class ActionPlayerClicksOnRunePedestal implements HypixelEventClass {
1212

1313

1414
@HypixelEvent(node = EventNodes.PLAYER, requireDataLoaded = true)
15-
public void run(PlayerEntityInteractEvent event) {
16-
if (!(event.getTarget() instanceof RuneEntityImpl)) return;
15+
public void run(PlayerBlockInteractEvent event) {
16+
if (!event.getBlockPosition().equals(new BlockVec(23, 64, -135))) return;
1717

1818
new GUIRunicPedestal().open((SkyBlockPlayer) event.getPlayer());
1919
}

type.hub/src/main/java/net/swofty/type/hub/npcs/NPCTheHandler.java

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package net.swofty.type.hub.npcs;
22

3-
import net.kyori.adventure.text.Component;
4-
import net.kyori.adventure.text.event.ClickEvent;
53
import net.minestom.server.coordinate.Pos;
64
import net.swofty.type.generic.entity.npc.HypixelNPC;
75
import net.swofty.type.generic.entity.npc.configuration.HumanConfiguration;
86
import net.swofty.type.generic.event.custom.NPCInteractEvent;
97
import net.swofty.type.generic.user.HypixelPlayer;
8+
import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer;
9+
10+
import java.util.List;
1011

1112
public class NPCTheHandler extends HypixelNPC {
1213

@@ -41,8 +42,20 @@ public boolean looking(HypixelPlayer player) {
4142

4243
@Override
4344
public void onClick(NPCInteractEvent e) {
44-
e.player().sendMessage(Component.text("§cThis Feature is not there yet. §aOpen a Pull request HERE to get it added quickly!")
45-
.clickEvent(ClickEvent.openUrl("https://github.com/Swofty-Developments/HypixelSkyBlock")));
45+
SkyBlockPlayer player = (SkyBlockPlayer) e.getPlayer();
46+
if (isInDialogue(player)) return;
47+
48+
setDialogue(player, "not-prosperous-" + (int) (Math.random() * 5 + 1));
4649
}
4750

51+
@Override
52+
protected DialogueSet[] dialogues(HypixelPlayer player) {
53+
return List.of(
54+
DialogueSet.builder().key("not-prosperous-1").lines(new String[]{"§dThe Hex §fwill not see you now."}).build(),
55+
DialogueSet.builder().key("not-prosperous-2").lines(new String[]{"he Hex is troubled by your presence."}).build(),
56+
DialogueSet.builder().key("not-prosperous-3").lines(new String[]{"There is an absence of §dprosperity §fwithin you."}).build(),
57+
DialogueSet.builder().key("not-prosperous-4").lines(new String[]{"§dThe Hex §fdoes not wish to be tainted with §duseless §fitems."}).build(),
58+
DialogueSet.builder().key("not-prosperous-5").lines(new String[]{"§fThe Hex §fdoes not have time for you."}).build()
59+
).toArray(DialogueSet[]::new);
60+
}
4861
}

type.hub/src/main/java/net/swofty/type/hub/runes/RuneEntityImpl.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)