pack: v0.40.0 — drop Alex's Mobs + bounty board fix + Numismatics polish
Drops Alex's Mobs from the pack (105 -> 103 mods total). The 4 AM-mob bounty entries are replaced with vanilla 1.21.x mob bounties (Breeze, Bogged, Evoker, Vindicator, Piglin Brute, Ravager). Bounty board bug fix: KubeJS PlayerEvents.loggedIn now ensures the daily pool is rolled on first login. Previously the pool only rolled when a player ran /bns bounty list, so the bounty board screen showed empty for anyone who'd never typed that command. /bns tier upgrade now uses combined cash+bank deduction via NumismaticsBridge.spend (Java). Players who've sold a fortune into their bank can now spend it on tier upgrades directly. Every player gets a bound white_card on first login — no more "I need to craft + bind a card before I can spend at a Vendor block" friction. bnstoolkit 0.6.2 -> 0.7.0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -59,12 +59,14 @@ const BOUNTY_POOL = [
|
||||
{ id: 'b_wither_skel_3', name: 'Slay 3 Wither Skeletons', target: 'minecraft:wither_skeleton', count: 3, type: 'kill', reward: 150, source: "Adventurer's Guild" },
|
||||
{ id: 'b_shulker_3', name: 'Slay 3 Shulkers', target: 'minecraft:shulker', count: 3, type: 'kill', reward: 200, source: "Adventurer's Guild" },
|
||||
|
||||
// ── Boss tier (rare picks) ──
|
||||
{ id: 'b_warden_1', name: 'Slay the Warden', target: 'minecraft:warden', count: 1, type: 'kill', reward: 800, source: "Adventurer's Guild" },
|
||||
{ id: 'b_voidworm_1', name: 'Destroy a Void Worm', target: 'alexsmobs:void_worm', count: 1, type: 'kill', reward: 1200, source: "Adventurer's Guild" },
|
||||
{ id: 'b_warped_mosco_1', name: 'Slay a Warped Mosco', target: 'alexsmobs:warped_mosco', count: 1, type: 'kill', reward: 700, source: "Adventurer's Guild" },
|
||||
{ id: 'b_farseer_1', name: 'Slay the Farseer', target: 'alexsmobs:farseer', count: 1, type: 'kill', reward: 900, source: "Adventurer's Guild" },
|
||||
{ id: 'b_skreecher_1', name: 'Slay a Skreecher', target: 'alexsmobs:skreecher', count: 1, type: 'kill', reward: 400, source: "Adventurer's Guild" },
|
||||
// ── Boss tier (rare picks) — all vanilla 1.21.x ──
|
||||
{ id: 'b_warden_1', name: 'Slay the Warden', target: 'minecraft:warden', count: 1, type: 'kill', reward: 800, source: "Adventurer's Guild" },
|
||||
{ id: 'b_breeze_3', name: 'Hunt 3 Breezes', target: 'minecraft:breeze', count: 3, type: 'kill', reward: 250, source: "Adventurer's Guild" },
|
||||
{ id: 'b_bogged_5', name: 'Slay 5 Bogged', target: 'minecraft:bogged', count: 5, type: 'kill', reward: 120, source: "Adventurer's Guild" },
|
||||
{ id: 'b_evoker_2', name: 'Slay 2 Evokers', target: 'minecraft:evoker', count: 2, type: 'kill', reward: 350, source: "Adventurer's Guild" },
|
||||
{ id: 'b_vindicator_4', name: 'Slay 4 Vindicators', target: 'minecraft:vindicator', count: 4, type: 'kill', reward: 180, source: "Adventurer's Guild" },
|
||||
{ id: 'b_piglin_brute_2', name: 'Slay 2 Piglin Brutes', target: 'minecraft:piglin_brute', count: 2, type: 'kill', reward: 400, source: "Adventurer's Guild" },
|
||||
{ id: 'b_ravager_1', name: 'Hunt down a Ravager', target: 'minecraft:ravager', count: 1, type: 'kill', reward: 500, source: "Adventurer's Guild" },
|
||||
];
|
||||
|
||||
// Index pool by id for O(1) lookup
|
||||
@@ -344,4 +346,14 @@ ServerEvents.commandRegistry(event => {
|
||||
event.register(bountyCmd);
|
||||
});
|
||||
|
||||
// ─── First-login pool roll ─────────────────────────────────────────
|
||||
// Without this, new players see an empty Bounty Board until they type
|
||||
// /bns bounty list (which triggers ensurePoolFresh). The board reads
|
||||
// bnsBountyPool from NBT; bnsBountyPool stays empty until rollDailyPool
|
||||
// runs. This hook closes the gap so the screen is populated the first
|
||||
// time it's opened.
|
||||
PlayerEvents.loggedIn(event => {
|
||||
ensurePoolFresh(event.player);
|
||||
});
|
||||
|
||||
console.info('[bns/bounty_engine] loaded — ' + BOUNTY_POOL.length + ' bounties in catalogue');
|
||||
|
||||
@@ -109,19 +109,20 @@ ServerEvents.commandRegistry(event => {
|
||||
}
|
||||
const nextTier = cur + 1;
|
||||
const nextCfg = bnsTier.config(nextTier);
|
||||
const balance = countCoins(player);
|
||||
if (balance < nextCfg.cost) {
|
||||
|
||||
// Combined cash+bank deduction via bnstoolkit Java bridge.
|
||||
// Pulls inventory coins first, then bank for the remainder.
|
||||
const Bridge = Java.loadClass('uk.sijbers.bnstoolkit.economy.NumismaticsBridge');
|
||||
const ok = Bridge.spend(player, nextCfg.cost);
|
||||
if (!ok) {
|
||||
const cash = countCoins(player);
|
||||
const bank = Bridge.balanceOf(player);
|
||||
player.tell(Text.red(
|
||||
'Upgrade to ' + nextCfg.name + ' costs ' + nextCfg.cost + ' spurs. You have ' + balance + '.'
|
||||
'Upgrade to ' + nextCfg.name + ' costs ' + nextCfg.cost + ' spurs. ' +
|
||||
'You have ' + cash + ' cash + ' + bank + ' bank = ' + (cash + bank) + ' total.'
|
||||
));
|
||||
return 0;
|
||||
}
|
||||
const took = takeCoins(player, nextCfg.cost);
|
||||
if (took < nextCfg.cost) {
|
||||
giveCoins(player, took);
|
||||
player.tell(Text.red('Coin removal failed — refunded. Try again.'));
|
||||
return 0;
|
||||
}
|
||||
// Promote via FTB Ranks
|
||||
const rankId = TIER_RANK_ID[nextTier];
|
||||
Utils.server.runCommandSilent('ftbranks add ' + player.username + ' ' + rankId);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user