Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d9d1cc4
feat: emissaries
ArikSquad Dec 27, 2025
69c3dac
fix: move Ceanna out of the slabs
ArikSquad Dec 27, 2025
802b3ce
feat: mithril and titanium lores
ArikSquad Dec 27, 2025
1ea1bff
feat: commissions
ArikSquad Dec 28, 2025
6f9daf3
refactor: use a record
ArikSquad Dec 28, 2025
582ed29
feat: unfinished dwarven mines mobs
ArikSquad Dec 28, 2025
ca673af
feat: more proper treasure hoarder
ArikSquad Dec 28, 2025
4aa6cec
fix: lilith yaw and pitch
ArikSquad Dec 28, 2025
cf19da1
Merge remote-tracking branch 'origin/master' into feat/emissaries
ArikSquad Dec 28, 2025
f6291b8
fix: import after merge
ArikSquad Dec 28, 2025
38cf51b
Merge remote-tracking branch 'origin/master' into feat/emissaries
ArikSquad Dec 28, 2025
b9bce68
Merge remote-tracking branch 'origin/master' into feat/emissaries
ArikSquad Dec 29, 2025
405aeee
Merge remote-tracking branch 'origin/master' into feat/emissaries
ArikSquad Dec 29, 2025
86ee06f
feat: AbstractEmissary for consistent logic
ArikSquad Dec 29, 2025
98fc885
Merge remote-tracking branch 'origin/master' into feat/emissaries
ArikSquad Dec 29, 2025
d5aca61
refactor: remove extra 0s on positions
ArikSquad Dec 29, 2025
4f1cfe1
Merge remote-tracking branch 'origin/master' into feat/emissaries
ArikSquad Dec 30, 2025
31c6fbb
Merge remote-tracking branch 'origin/master' into feat/emissaries
ArikSquad Dec 30, 2025
314cb84
Merge remote-tracking branch 'origin/master' into feat/emissaries
ArikSquad Dec 31, 2025
d959e45
feat: give royal pigeon and royal compass
ArikSquad Dec 31, 2025
1505a7f
feat: name all Royal Guard in chat
ArikSquad Dec 31, 2025
e5e7c17
Merge remote-tracking branch 'origin/master' into feat/emissaries
ArikSquad Dec 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public enum ItemType {
RAW_SOULFLOW(Material.PLAYER_HEAD, Rarity.UNCOMMON),
SOULFLOW(Material.PLAYER_HEAD, Rarity.RARE),

ROYAL_COMPASS(Material.PLAYER_HEAD, Rarity.RARE),
ROYAL_PIGEON(Material.PLAYER_HEAD, Rarity.LEGENDARY),

/**
* Accessories
*/
Expand Down
38 changes: 38 additions & 0 deletions configuration/skyblock/items/mining/dwarven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,25 @@ items:
rarity: COMMON
- id: MITHRIL
rarity: COMMON
lore:
- "§7§o\"The Man called it \"true-silver\" while"
- "§7§othe Dwarves, who loved it above all"
- "§7§othings, had their own, secret name"
- "§7§ofor it.\""
components:
- id: SELLABLE
value: 8.0
- id: SKILLABLE_MINE
category: MINING
mining_value: 6.0
- id: EXTRA_RARITY
display: DWARVEN METAL
- id: BREWING_INGREDIENT
brewing_time_seconds: 20
effect: SPELUNKER_POTION_1
effect_duration: 0
effect_amplifier: 0
alchemy_xp: 5
- id: PLASMA
rarity: COMMON
components:
Expand Down Expand Up @@ -49,6 +62,10 @@ items:
value: 15.0
- id: TITANIUM
rarity: COMMON
lore:
- "§7Its strength and resistance to"
- "§7corrosion are the highest of any"
- "§7metallic element."
components:
- id: SELLABLE
value: 20.0
Expand All @@ -57,6 +74,8 @@ items:
mining_value: 0.0
- id: SKULL_HEAD
texture: a14c6e41a762d37863a9fff6888c738905b92cc6c3898892a38dfdfe2ac4bf
- id: EXTRA_RARITY
display: DWARVEN METAL
- id: TREASURITE
rarity: COMMON
components:
Expand All @@ -71,3 +90,22 @@ items:
texture: 63a405fb286dbb32e9b3908f60948f0207306c825e63ac9e626ed1dbb2f7a2be
- id: EXTRA_UNDER_NAME
display: Machine Fuel
- id: ROYAL_PIGEON
rarity: LEGENDARY
material: PLAYER_HEAD
components:
- id: SKULL_HEAD
texture: 63a405fb286dbb32e9b3908f60948f0207306c825e63ac9e626ed1dbb2f7a2be
- id: DEFAULT_SOULBOUND
coop_allowed: true
- id: ROYAL_COMPASS
rarity: RARE
material: PLAYER_HEAD
components:
- id: ABILITY
abilities:
- TRUE_DWARTH
- id: SKULL_HEAD
texture: f106277ad541aa76d9d4a19e7aac92621a3f0251ff9427dfdea539b51dd8d1ea
- id: DEFAULT_SOULBOUND
coop_allowed: true
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import net.minestom.server.coordinate.Pos;
import net.minestom.server.registry.RegistryKey;
import net.minestom.server.world.DimensionType;
import net.minestom.server.world.biome.Biome;
import net.minestom.server.world.biome.BiomeEffects;
import net.swofty.commons.CustomWorlds;
import net.swofty.commons.ServerType;
import net.swofty.commons.ServiceType;
Expand Down Expand Up @@ -110,7 +112,8 @@ public List<ServiceType> getRequiredServices() {
return MinecraftServer.getDimensionTypeRegistry().register(
Key.key("skyblock:dwarven_mines"),
DimensionType.builder()
.ambientLight(0.4f)
.ambientLight(1f)
.build());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
package net.swofty.type.dwarvenmines.commission;

public class Commission {
public final String name;
public final CommissionCategory category;
public final Objective objective;
public final boolean oneTimeOnly;

public Commission(
String name,
CommissionCategory category,
Objective objective,
boolean oneTimeOnly
) {
this.name = name;
this.category = category;
this.objective = objective;
this.oneTimeOnly = oneTimeOnly;
}

public String generateDescription() {
StringBuilder sb = new StringBuilder();

switch (objective.type) {
case MINE -> {
sb.append("Mine §a").append(objective.amount).append(" §7");
sb.append(getTargetName(objective.target)).append(" Ore");
appendLocation(sb);
sb.append(".");
}
case SLAY -> {
sb.append("Slay §a").append(objective.amount).append(" §7");
sb.append(getTargetNamePlural(objective.target));
sb.append("§7");
appendLocation(sb);
appendEvent(sb);
sb.append(".");
}
case DAMAGE -> {
sb.append("Damage ").append(getTargetNamePlural(objective.target));
sb.append(" §7").append(objective.amount).append(" times");
appendLocation(sb);
sb.append(".");
}
case PARTICIPATE -> sb.append("Participate in the ").append(getEventName(objective.event)).append(".");
case COLLECT -> {
sb.append("Collect ").append(objective.amount).append(" ");
sb.append(getCollectibleName(objective.target));
appendEvent(sb);
sb.append(".");
}
case DEPOSIT -> {
sb.append("Deposit ").append(objective.amount).append(" Tickets");
appendEvent(sb);
sb.append(".");
}
}

return sb.toString();
}

private void appendLocation(StringBuilder sb) {
if (!objective.location.isAny()) {
objective.location.getRegion().ifPresent(region ->
sb.append(" in §b").append(region.getName()));
}
}

private void appendEvent(StringBuilder sb) {
if (objective.event != EventType.NONE) {
sb.append(" during the ").append(getEventName(objective.event));
}
}

private String getTargetName(Objective.BlockTarget target) {
return switch (target) {
case MITHRIL -> "Mithril";
case TITANIUM -> "Titanium";
case GOBLIN -> "Goblin";
case GLACITE_WALKER -> "Glacite Walker";
case TREASURE_HOARDER -> "Treasure Hoarder";
case GOLDEN_GOBLIN -> "Golden Goblin";
case STAR_SENTRY -> "Star Sentry";
case NONE -> "";
};
}

private String getTargetNamePlural(Objective.BlockTarget target) {
return switch (target) {
case MITHRIL -> "Mithril Ore";
case TITANIUM -> "Titanium Ore";
case GOBLIN -> "§cGoblins";
case GLACITE_WALKER -> "§bGlacite Walkers";
case TREASURE_HOARDER -> "§cTreasure Hoarders";
case GOLDEN_GOBLIN -> "§6Golden Goblin";
case STAR_SENTRY -> "Star Sentrys";
case NONE -> "";
};
}

private String getCollectibleName(Objective.BlockTarget target) {
return switch (target) {
case MITHRIL -> "Mithril Powder";
default -> target.name();
};
}

private String getEventName(EventType event) {
return switch (event) {
case GOBLIN_RAID -> "§cGoblin Raid §7Event";
case RAFFLE -> "§eRaffle §7Event";
case DOUBLE_POWDER -> "2x Powder Event";
case NONE -> "";
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package net.swofty.type.dwarvenmines.commission;

public enum CommissionCategory {
CONSISTENT,
SITUATIONAL,
TUTORIAL
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
package net.swofty.type.dwarvenmines.commission;

import lombok.Getter;

@Getter
public enum CommissionMilestone {
TIER_1(1, 5, 100_000, 20, true, false, false, false, false, false),
TIER_2(2, 25, 200_000, 30, false, false, false, false, false, false),
TIER_3(3, 100, 400_000, 30, false, true, false, false, false, false),
TIER_4(4, 250, 800_000, 50, false, false, true, false, false, false),
TIER_5(5, 500, 1_200_000, 50, false, false, false, true, false, false),
TIER_6(6, 750, 1_600_000, 75, false, false, false, false, true, false);

private final int tier;
private final int commissionsRequired;
private final int miningXpReward;
private final int skyBlockXpReward;
private final boolean unlocksEmissaries;
private final boolean unlocksExtraSlot;
private final boolean unlocksDwarvenMinesScroll;
private final boolean unlocksRoyalPigeon;
private final boolean unlocksCrystalNucleusScroll;
private final boolean hasSpecialReward;

CommissionMilestone(int tier, int commissionsRequired, int miningXpReward, int skyBlockXpReward,
boolean unlocksEmissaries, boolean unlocksExtraSlot,
boolean unlocksDwarvenMinesScroll, boolean unlocksRoyalPigeon,
boolean unlocksCrystalNucleusScroll, boolean hasSpecialReward) {
this.tier = tier;
this.commissionsRequired = commissionsRequired;
this.miningXpReward = miningXpReward;
this.skyBlockXpReward = skyBlockXpReward;
this.unlocksEmissaries = unlocksEmissaries;
this.unlocksExtraSlot = unlocksExtraSlot;
this.unlocksDwarvenMinesScroll = unlocksDwarvenMinesScroll;
this.unlocksRoyalPigeon = unlocksRoyalPigeon;
this.unlocksCrystalNucleusScroll = unlocksCrystalNucleusScroll;
this.hasSpecialReward = hasSpecialReward;
}

public static CommissionMilestone getMilestoneForCompleted(int totalCompleted) {
CommissionMilestone result = null;
for (CommissionMilestone milestone : values()) {
if (totalCompleted >= milestone.commissionsRequired) {
result = milestone;
}
}
return result;
}

public static CommissionMilestone getNextMilestone(int totalCompleted) {
for (CommissionMilestone milestone : values()) {
if (totalCompleted < milestone.commissionsRequired) {
return milestone;
}
}
return null;
}

public String[] getRewardDescriptions() {
java.util.List<String> rewards = new java.util.ArrayList<>();

if (unlocksEmissaries) {
rewards.add("§7- §aEmissaries");
rewards.add("§7- §6Royal Compass");
}
if (unlocksExtraSlot) {
rewards.add("§7- §a+1 Commission Slot");
}
if (unlocksDwarvenMinesScroll) {
rewards.add("§7- §5Travel Scroll to Dwarven Mines");
}
if (unlocksRoyalPigeon) {
rewards.add("§7- §6Royal Pigeon");
}
if (unlocksCrystalNucleusScroll) {
rewards.add("§7- §5Travel Scroll to Crystal Nucleus");
}

rewards.add("§7- §3+" + String.format("%,d", miningXpReward) + " Mining XP");
rewards.add("§7- §b+" + skyBlockXpReward + " SkyBlock XP");

return rewards.toArray(new String[0]);
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package net.swofty.type.dwarvenmines.commission;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;

public record CommissionReward(int hotmXp, int miningXp, int mithrilPowder, boolean isDailyBonus) {
public static CommissionReward calculate(int hotmTier, boolean isHotmMaxed, boolean isDailyBonus) {
int hotmXp;
int miningXp;
int mithrilPowder;

if (!isHotmMaxed) {
if (hotmTier == 1) {
hotmXp = 100;
} else if (hotmTier == 2) {
hotmXp = 200;
} else {
hotmXp = 400;
}
} else {
hotmXp = 0;
}

miningXp = ThreadLocalRandom.current().nextInt(5_000, 10_001);
if (!isHotmMaxed) {
mithrilPowder = ThreadLocalRandom.current().nextInt(100, 201);
} else {
mithrilPowder = 500;
}

int dailyBonusHotmXp = 0;
int dailyBonusPowder = 0;
if (isDailyBonus) {
if (!isHotmMaxed) {
dailyBonusHotmXp = 900;
} else {
dailyBonusPowder = 2000;
}
}

return new CommissionReward(
hotmXp + dailyBonusHotmXp,
miningXp,
mithrilPowder + dailyBonusPowder,
isDailyBonus
);
}

public static String[] getRewardLore(int hotmTier, boolean isHotmMaxed, boolean isDailyBonus) {
List<String> lore = new ArrayList<>();

if (!isHotmMaxed) {
int baseHotmXp;
if (hotmTier == 1) {
baseHotmXp = 100;
} else if (hotmTier == 2) {
baseHotmXp = 200;
} else {
baseHotmXp = 400;
}

if (isDailyBonus) {
lore.add("§7- §5+" + (baseHotmXp + 900) + " Heart of the Mountain XP §e(Daily Bonus)");
} else {
lore.add("§7- §5+" + baseHotmXp + " Heart of the Mountain XP");
}
}

if (!isHotmMaxed) {
if (isDailyBonus) {
lore.add("§7- §2+100 Mithril Powder");
} else {
lore.add("§7- §2+100 Mithril Powder");
}
} else {
lore.add("§7- §2+500 Mithril Powder");
}

lore.add("§7- §3+7.5k Mining XP");

return lore.toArray(new String[0]);
}
}

Loading