Skip to content

Commit 4170bf3

Browse files
Merge pull request Swofty-Developments#632 from ArikSquad/fix/the-park-bugs
The park bugs
2 parents 4ee69fb + 76e5dd0 commit 4170bf3

4 files changed

Lines changed: 21 additions & 7 deletions

File tree

type.thepark/src/main/java/net/swofty/type/thepark/TypeTheParkLoader.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,18 @@ public void afterInitialize(MinecraftServer server) {
103103
if (shouldRenderTraps(p)) {
104104
return true;
105105
}
106+
if (p.getMissionData().isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) {
107+
return finalIndex == 1;
108+
}
109+
if (p.getMissionData().isCurrentlyActive(MissionHelpMolbert.class)) {
110+
return finalIndex == 1;
111+
}
106112
if(!p.getMissionData().isCurrentlyActive(MissionPlaceTraps.class)) {
107113
return false;
108114
}
109115

110116
MissionData.ActiveMission activeMission = p.getMissionData().getMission(MissionPlaceTraps.class).getKey();
111117
List<Integer> placedTraps = (List<Integer>) activeMission.getCustomData().getOrDefault("placedTraps", new ArrayList<Integer>());
112-
Logger.info("Placed traps for player {}: {}", p.getUsername(), placedTraps);
113118
return !placedTraps.contains(finalIndex);
114119
});
115120
entities.add(text);
@@ -140,6 +145,9 @@ public void afterInitialize(MinecraftServer server) {
140145
if (player.getMissionData().isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) {
141146
return finalIndex == 1;
142147
}
148+
if (player.getMissionData().isCurrentlyActive(MissionHelpMolbert.class)) {
149+
return finalIndex == 1;
150+
}
143151
if(!player.getMissionData().isCurrentlyActive(MissionPlaceTraps.class)) {
144152
return false;
145153
}

type.thepark/src/main/java/net/swofty/type/thepark/events/ActionContinueParkMission.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.swofty.type.thepark.events;
22

3+
import net.minestom.server.entity.Entity;
34
import net.swofty.type.generic.entity.npc.HypixelNPC;
45
import net.swofty.type.generic.event.EventNodes;
56
import net.swofty.type.generic.event.HypixelEvent;
@@ -9,12 +10,12 @@
910
import net.swofty.type.skyblockgeneric.mission.missions.thepark.birchpark.MissionTravelToThePark;
1011
import net.swofty.type.skyblockgeneric.mission.missions.thepark.darkthicket.MissionFindTheCampfire;
1112
import net.swofty.type.skyblockgeneric.mission.missions.thepark.darkthicket.MissionTravelToTheDarkThicket;
12-
import net.swofty.type.skyblockgeneric.mission.missions.thepark.jungle.MissionTalkToMolbert;
13+
import net.swofty.type.skyblockgeneric.mission.missions.thepark.jungle.MissionTalkToMolbertAgainAgainAgain;
1314
import net.swofty.type.skyblockgeneric.mission.missions.thepark.savanna.MissionTravelToTheSavannaWoodland;
1415
import net.swofty.type.skyblockgeneric.mission.missions.thepark.spruce.MissionTravelToTheSpruceWoods;
1516
import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer;
17+
import net.swofty.type.thepark.TypeTheParkLoader;
1618
import net.swofty.type.thepark.npcs.NPCWorkerXavier;
17-
import org.tinylog.Logger;
1819

1920
public class ActionContinueParkMission implements HypixelEventClass {
2021

@@ -60,6 +61,11 @@ public void run(PlayerRegionChangeEvent event) {
6061
});
6162
}
6263
}
64+
case JUNGLE_ISLAND -> {
65+
if (data.isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) {
66+
TypeTheParkLoader.entities.forEach(Entity::updateViewableRule);
67+
}
68+
}
6369
case null, default -> {
6470
}
6571
}

type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCMolbert.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ public void onClick(NPCInteractEvent event) {
145145
if (data.isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) {
146146
TypeTheParkLoader.entities.forEach(Entity::updateViewableRule);
147147
setDialogue(player, "stuck").thenRun(() -> {
148+
data.endMission(MissionTalkToMolbertAgainAgainAgain.class);
148149
NPCOption.sendOption(player, "molbert", false, List.of(
149150
new NPCOption.Option(
150151
"help",
@@ -153,11 +154,10 @@ public void onClick(NPCInteractEvent event) {
153154
"HELP MOLBERT",
154155
(p) -> {
155156
data.endMission(MissionHelpMolbert.class);
157+
TypeTheParkLoader.entities.forEach(Entity::updateViewableRule);
156158
}
157159
)
158160
));
159-
if (data.isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class))
160-
data.endMission(MissionTalkToMolbertAgainAgainAgain.class);
161161
});
162162
return;
163163
}
@@ -231,7 +231,7 @@ protected DialogueSet[] dialogues(HypixelPlayer player) {
231231
"...and then I ate the §6carrot §fbecause I was almost starving in there!"
232232
}).build(),
233233
DialogueSet.builder().key("option-iknow").lines(new String[]{
234-
cOf, fine you caught me. But §cplease don't tell the others§f, they wouldn't want to be my friends anymore if they knew the truth.",
234+
fOk, fine you caught me. But §cplease don't tell the others§f, they wouldn't want to be my friends anymore if they knew the truth.",
235235
"Here, take this §acompensation §ffor all the trouble I made you go through.",
236236
"I hope you forgive me after this and we can still be §6friends§f."
237237
}).build(),

type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCRomero.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public NPCRomero() {
1616
super(new HumanConfiguration() {
1717
@Override
1818
public String[] holograms(HypixelPlayer player) {
19-
return new String[]{};
19+
return new String[]{" "};
2020
}
2121

2222
@Override

0 commit comments

Comments
 (0)