Skip to content

Add spawner boost and crop growth boost reward types (#61)#77

Merged
tastybento merged 1 commit intodevelopfrom
feature/spawner-and-crop-growth-upgrades
Feb 24, 2026
Merged

Add spawner boost and crop growth boost reward types (#61)#77
tastybento merged 1 commit intodevelopfrom
feature/spawner-and-crop-growth-upgrades

Conversation

@tastybento
Copy link
Member

Summary

  • Adds SpawnerReward / SpawnerRewardDB: listens to SpawnerSpawnEvent and spawns extra entities beside the triggered spawner, scaled by a per-tier formula
  • Adds CropGrowthReward / CropGrowthRewardDB: listens to BlockGrowEvent on agricultural crops and applies extra applyBoneMeal() calls, scaled by a per-tier formula
  • Both use a fractional-bonus approach (0.5 → 50% chance of one extra per trigger; 1.5 → always 1 extra plus 50% chance of a second)
  • Compatible with WildStacker, RoseStacker, and any other stacker plugin — extra entities are spawned as raw entities which the stacker then handles normally
  • Adds a public getUpgradeData() getter on DatabaseUpgrade (needed by listeners to resolve tiers)
  • Registers both reward types and both listeners in UpgradesAddon.onEnable()
  • Seeds 2 new example upgrades on first install (Spawner Boost @ $2000, Crop Growth Boost @ $500), bringing the default total to 8
  • Adds upgrades.rewards.spawner.* and upgrades.rewards.cropgrowth.* locale keys to en-US.yml

Test plan

  • mvn test — all 102 existing tests pass
  • Start server with BSkyBlock; confirm 8 example upgrades are seeded
  • Admin creates a Spawner Boost upgrade with formula 0.5, price $1000
  • Player purchases it; no console errors
  • Stand near a spawner — extra entities appear next to it on spawner ticks
  • Admin creates a Crop Growth upgrade with formula 0.5, price $500
  • Player purchases it; plant wheat on island — crop advances faster than a non-upgraded island
  • Test with WildStacker enabled — extra entities are stacked normally
  • Verify admin panel formula input validates and shows green/red status correctly

Closes #61

🤖 Generated with Claude Code

Implements two new passive/ongoing upgrade reward types:
- SpawnerReward: spawns extra entities on SpawnerSpawnEvent, proportional to a configurable formula
- CropGrowthReward: applies extra applyBoneMeal() on BlockGrowEvent for agricultural crops

Both use a fractional bonus approach (e.g. 0.5 = 50% chance of one extra per trigger)
and are compatible with any stacker plugin. Two example upgrades (Spawner Boost,
Crop Growth Boost) are now seeded on first install (8 total).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@tastybento tastybento merged commit ee5ce47 into develop Feb 24, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Island Spawner and Farm Booster preset upgrades

1 participant