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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user