Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -244,26 +244,24 @@ private void stamp(Player player, Inventory top) {
drawCollection(top, player);
refreshPreview(top, player);
player.playSound(player.getLocation(), Sound.UI_TOAST_CHALLENGE_COMPLETE, 0.8f, 1.25f);
player.sendMessage("§bSurveyor §8» §f" + kind.display() + " §7stamped. Tool's yours.");
player.sendMessage(de.aetherion.core.exile.Say.t(player,
"§bSurveyor §8» §f" + kind.display() + " §7stamped. Tool's yours.",
"§bSurveyor §8» §f" + kind.display() + " §7gestempelt. Das Werkzeug gehört dir."));
String[] best = bestPlace(kind);
player.sendMessage(de.aetherion.core.exile.Say.t(player,
"§bSurveyor §8» §7Its best place: §f" + best[0] + "§7.",
"§bSurveyor §8» §7Sein bester Ort: §f" + best[1] + "§7."));
ActionBarLane.show(player, net.kyori.adventure.text.Component.text(
kind.display() + " crafted",
kind.display() + de.aetherion.core.exile.Say.t(player, " crafted", " hergestellt"),
net.kyori.adventure.text.format.NamedTextColor.AQUA
));
clearSurveyorHint(player);
if (first && mineBeforeBoss(player)) {
// strand 1 before its first boss: the pad opens, but the ore hall comes first (strand design, M1A)
player.sendMessage(de.aetherion.core.exile.Say.t(player,
"§bSurveyor §8» §7That's your first tool, and the §6Mining pad§7 is open whenever you like. First, though, the ore hall: copper armour, your own booster, and iron for Cinder's grappling hook.",
"§bSurveyor §8» §7Dein erstes Werkzeug, und das §6Mining-Pad§7 ist offen, wann du willst. Erst aber die Erzhalle: Kupfer-Rüstung, dein eigener Booster und Eisen für Cinders Enterhaken."));
} else if (first) {
// the mining road's last step: the pad on Origin opens with this first tool
if (first) {
// the Shabby Mine's last step: the pad on Origin opens with this first tool (2026-12-03: straight away,
// steel comes after the isle)
player.sendMessage(de.aetherion.core.exile.Say.t(player,
"§bSurveyor §8» §7That's your first tool. The §6Mining pad§7 is open now: §6Old Wick§7 waits on the isle.",
"§bSurveyor §8» §7Dein erstes Werkzeug. Das §6Mining-Pad§7 ist jetzt offen: §6Old Wick§7 wartet auf der Insel."));
"§bSurveyor §8» §7That's your first tool, a tool of its own next to your pickaxe. The §6Mining pad§7 is open now: §6Old Wick§7 waits on the isle.",
"§bSurveyor §8» §7Dein erstes Werkzeug, ein eigenes neben deiner Spitzhacke. Das §6Mining-Pad§7 ist jetzt offen: §6Old Wick§7 wartet auf der Insel."));
pointMinePad(player);
}
}
Expand All @@ -280,18 +278,6 @@ private static String[] bestPlace(BlueprintKind kind) {
};
}

/** Strand 1 before its first boss (Quests Strands#mineBeforeBoss); false without Quests. */
private static boolean mineBeforeBoss(Player player) {
try {
Object result = Class.forName("de.aetherion.quests.listener.Strands")
.getMethod("mineBeforeBoss", Player.class)
.invoke(null, player);
return Boolean.TRUE.equals(result);
} catch (ReflectiveOperationException | LinkageError | RuntimeException ignored) {
return false;
}
}

private static void pointMinePad(Player player) {
try {
Class.forName("de.aetherion.quests.ui.SkillRoads")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4955,6 +4955,38 @@ public ItemStack createMiningPickaxe2() {
return item;
}

/**
* Temper's own pick, lent for the six iron of the first horse (Quests {@code LoanPick} hands it out and takes it
* back). Breaks iron ore (Mining Power 24). It has no item profile on purpose: no recipe takes it and no
* booster goes into it.
*/
public ItemStack createTemperPickaxe() {
ItemStack item = new ItemStack(Material.IRON_PICKAXE);
ItemMeta meta = item.getItemMeta();
if (meta != null) {
setItemId(meta, "temper_pickaxe");
ItemStats stats = new ItemStats();
stats.setMiningPower(26);
stats.setFortune(24);
stats.setSpread(2);
applyItemData(meta, Rarity.UNCOMMON, stats);
meta.setDisplayName("§aTemper's Pickaxe");
meta.setLore(List.of(
"§7⛏ Mining Power: §f+26",
"§7💎 Fortune: §f+24",
"§7✦ Spread: §f+2.00",
"",
"§7On loan from Temper. It breaks iron ore.",
"§8Goes back to him with the six iron."
));
meta.setCustomModelData(2221);
meta.setUnbreakable(true);
hideVanillaAttributes(meta);
item.setItemMeta(meta);
}
return item;
}

/*
* =========================================================
* GOD ITEM HELPER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,74 @@ private static boolean firstPage(Player player) {
}

/**
* Trolls crawl for everyone from the Shaft Foreman on (R-24): First Shift handed out, running or done.
* Players the Surveyor already sent hunting stay open too.
* Trolls crawl once the player is kitted (Robb 2026-12-03: full gear and a few boosters first, then the trolls):
* Quests decides ({@code Strands#trollsReady}: on the Mining road the pick carries its first booster). Players the
* Surveyor already sent hunting stay open too.
*/
private boolean trollsOpen(Player player) {
UUID id = player.getUniqueId();
if (trollsOpen.contains(id)) {
return true;
}
if (BlueprintHunt.unlocked(player) || foremanShiftStarted(player)) {
if (BlueprintHunt.unlocked(player) || questsSayReady(player)) {
trollsOpen.add(id);
return true;
}
return false;
}

/** Quests' answer; an older Quests jar without it keeps the old rule (First Shift handed out, R-24). */
private static boolean questsSayReady(Player player) {
try {
Object result = Class.forName("de.aetherion.quests.listener.Strands")
.getMethod("trollsReady", Player.class)
.invoke(null, player);
return Boolean.TRUE.equals(result);
} catch (ReflectiveOperationException | LinkageError | RuntimeException ex) {
return foremanShiftStarted(player);
}
}

/** A living troll that crawled out for this player (the Mining road's arrow points at it), or null. */
public Location trollOf(Player player) {
if (player == null) {
return null;
}
for (Map.Entry<UUID, UUID> entry : liveTrolls.entrySet()) {
if (!player.getUniqueId().equals(entry.getValue())) {
continue;
}
Entity troll = plugin.getServer().getEntity(entry.getKey());
if (troll != null && troll.isValid() && !troll.isDead() && troll.getWorld().equals(player.getWorld())) {
return troll.getLocation();
}
}
return null;
}

private static boolean german(Player player) {
try {
return de.aetherion.core.api.AetherServices.german(player);
} catch (LinkageError | RuntimeException ex) {
return false;
}
}

/** The small popup under the compass; false where the pack-drawn HUD is off. */
private static boolean note(Player player, String title, String... rows) {
try {
var legacy = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection();
java.util.List<net.kyori.adventure.text.Component> lines = new java.util.ArrayList<>();
for (String row : rows) {
lines.add(legacy.deserialize("§7" + row));
}
return de.aetherion.core.api.HudNotes.show(player, de.aetherion.core.api.BarChrome.Icon.PICK,
legacy.deserialize(title), net.kyori.adventure.text.format.NamedTextColor.GOLD, lines, 200);
} catch (LinkageError | RuntimeException ex) {
return false;
}
}

/** First Shift is ACTIVE, READY or COMPLETED. Uses only long-standing Quests API, so old Quests jars still answer. */
private static boolean foremanShiftStarted(Player player) {
try {
Expand Down Expand Up @@ -246,11 +299,19 @@ public LivingEntity spawn(Location at, Player aggro) {
world.playSound(spot, Sound.ENTITY_ZOMBIE_VILLAGER_CURE, 0.55f, 1.6f);
world.playSound(spot, Sound.BLOCK_STONE_BREAK, 0.45f, 0.7f);
if (aggro != null) {
aggro.sendMessage("§6✦ §eTiny Ore Troll §7crawls out of the vein!");
boolean de = german(aggro);
aggro.sendMessage(de ? "§6✦ §eEin kleiner Erz-Troll §7kriecht aus der Ader!"
: "§6✦ §eTiny Ore Troll §7crawls out of the vein!");
ActionBarLane.show(aggro, net.kyori.adventure.text.Component.text(
"Pickaxe only · rarity = damage",
de ? "Nur mit der Spitzhacke · Seltenheit = Schaden" : "Pickaxe only · rarity = damage",
net.kyori.adventure.text.format.NamedTextColor.YELLOW
));
if (firstPage(aggro)) {
// the first one is announced (playtest 2026-12-03: "nichts reagiert darauf")
note(aggro, de ? "Erz-Troll!" : "Ore Troll!",
de ? "Er trägt eine Blaupausen-Seite." : "It carries a blueprint page.",
de ? "Schlag ihn mit der Spitzhacke." : "Strike it with your pickaxe.");
}
}
return troll;
}
Expand Down Expand Up @@ -454,8 +515,11 @@ public void onDeath(EntityDeathEvent event) {
return;
}
killer.playSound(killer.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 0.7f, 0.8f);
if (!firstPage(killer) && ThreadLocalRandom.current().nextDouble() >= BLUEPRINT_CHANCE) {
killer.sendMessage("§6Tiny Ore Troll §7crumbles — no schematic this time.");
boolean de = german(killer);
boolean first = firstPage(killer);
if (!first && ThreadLocalRandom.current().nextDouble() >= BLUEPRINT_CHANCE) {
killer.sendMessage(de ? "§6Der Erz-Troll §7zerbröselt. Diesmal ohne Seite."
: "§6Tiny Ore Troll §7crumbles. No page this time.");
return;
}
AetherionItems items = AetherionItems.getInstance();
Expand All @@ -475,7 +539,13 @@ public void onDeath(EntityDeathEvent event) {
if (items.blueprintUnlocks() != null) {
items.blueprintUnlocks().markCollected(killer, kind.id());
}
killer.sendMessage("§b✦ §fBlueprint: " + kind.display() + " §7— take it to the §eSurveyor§7.");
killer.sendMessage(de ? "§b✦ §fBlaupause: " + kind.display() + " §7· bring sie zum §eSurveyor§7."
: "§b✦ §fBlueprint: " + kind.display() + " §7· take it to the §eSurveyor§7.");
if (first) {
note(killer, de ? "Blaupausen-Seite" : "Blueprint page",
de ? "Der Surveyor stempelt sie," : "The Surveyor stamps it",
de ? "tiefer in der Shabby Mine." : "deeper in the Shabby Mine.");
}
killer.playSound(killer.getLocation(), Sound.UI_TOAST_CHALLENGE_COMPLETE, 0.75f, 1.35f);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ private static QuestProgressAccess.JournalQuest lesson(QuestProgressAccess quest
return null;
}

/** The Mining pad is open for this player: a blueprint tool was stamped, or the Mining Isle is known. */
private static boolean mineRoadOpen(Player player) {
try {
AetherionItems plugin = AetherionItems.getInstance();
if (plugin != null && plugin.blueprintUnlocks() != null && plugin.blueprintUnlocks().hasStampedAny(player)) {
return true;
}
de.aetherion.core.api.MiningAccess mining = AetherServices.mining();
return mining != null && mining.knowsIsle(player);
} catch (LinkageError | RuntimeException ex) {
return false;
}
}

private static boolean done(QuestProgressAccess quests, Player player, String quest) {
try {
return quests != null && quests.isQuestCompleted(player, quest);
Expand Down Expand Up @@ -173,6 +187,11 @@ public static List<String> nextGoals(Player player, boolean de) {
out.add(de ? "Temper in der Schmiede will sechs Eisenbarren für Hufeisen. Dann gehört das Pferd dir."
: "Temper at the forge wants six iron ingots for horseshoes. Then the horse is yours.");
}
if (f.mounted() && !f.hooked() && !mineRoadOpen(player)) {
// 2026-12-03 (Robb): Mining comes first, steel (hook and boss) is the second chapter
out.add(de ? "Erst Mining: der Shaft Foreman in der Shabby Mine. Ausrüstung, dein erstes Blaupausen-Werkzeug, dann die Mining-Insel."
: "Mining first: the Shaft Foreman in the Shabby Mine. Your kit, your first blueprint tool, then the Mining Isle.");
}
if (!f.hooked()) {
out.add(de ? "Hol dir bei Cinder in den Borderlands deinen Enterhaken."
: "Get your grappling hook from Cinder in the Borderlands.");
Expand Down
3 changes: 3 additions & 0 deletions AetherionItems/src/main/resources/lang/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ names:
- {en: "Tide Latch", de: "Gezeitenhaken"}
- {en: "Mining Pickaxe", de: "Bergbau-Spitzhacke"}
- {en: "Iron Mining Pickaxe", de: "Eisen-Bergbau-Spitzhacke"}
- {en: "Temper's Pickaxe", de: "Tempers Spitzhacke"}
- {en: "GOD Pickaxe", de: "GOTT-Spitzhacke"}
- {en: "GOD Axe", de: "GOTT-Axt"}
- {en: "GOD Sword", de: "GOTT-Schwert"}
Expand Down Expand Up @@ -1173,6 +1174,8 @@ text:
- {en: "§7Cable never yanks you — gas is look-only.", de: "§7Das Seil reißt dich nie — Gas folgt nur deinem Blick."}
- {en: "§8Hang · boost · swing · chain.", de: "§8Hängen · boosten · schwingen · verketten."}
- {en: "§7It mines. That is the entire personality.", de: "§7Sie baut ab. Das ist die ganze Persönlichkeit."}
- {en: "§7On loan from Temper. It breaks iron ore.", de: "§7Von Temper geliehen. Sie bricht Eisenerz."}
- {en: "§8Goes back to him with the six iron.", de: "§8Geht mit den sechs Eisen an ihn zurück."}
- {en: "§7The rocks are not impressed. Yet.", de: "§7Die Felsen sind unbeeindruckt. Noch."}
- {en: "§7Trees have started taking it personally.", de: "§7Die Bäume nehmen es langsam persönlich."}
- {en: "§7Farming, but make it an insult.", de: "§7Ackerbau, aber als Schimpfwort."}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ public void onEnable() {
);
de.aetherion.quests.tutorial.OrientationWatch.start(this, questManager);
Bukkit.getPluginManager().registerEvents(new de.aetherion.quests.tutorial.BoosterPick(), this);
Bukkit.getPluginManager().registerEvents(new de.aetherion.quests.listener.LoanPick(), this);
de.aetherion.quests.listener.SurveyorMineHintListener surveyorHint =
new de.aetherion.quests.listener.SurveyorMineHintListener(this);
Bukkit.getPluginManager().registerEvents(surveyorHint, this);
Expand Down
Loading
Loading