SysAdmin b28e4d0610 fix(hemp): trader scope to held stack + chest loot guard + wild scatter bridge
Three mid-session fixes to the hemp progression mechanics:

- Trader buyback now operates on the held stack only. Earlier code
  walked the entire inventory to count and consume hemp items, so
  right-clicking with a stack of 64 buds while having more in other
  slots traded everything. Reproduced by user holding 64, ended up
  losing all stacks. Fixed: count = stack.amount, consume modifies
  only the selected hotbar slot. Other stacks of the same item stay
  intact.

- Chest loot handler removed the `if (stack) return` guard. It was
  meant to skip placement events but blocked nearly every legitimate
  chest open (players almost always hold an item). Now every fresh
  chest open rolls; per-chest seeded set still prevents repeats.
  Added a chat ping when seeds drop so players notice.

- Added a script-side wild hemp scatter on a 60s tick to bridge the
  worldgen gap. Bedrock features only fire on FRESH chunk generation,
  so legacy worlds where players have already explored never see the
  feature_rule patches. Scatter picks a random online overworld
  player every minute (40% chance), finds a grass surface within 32
  blocks, places 2-4 mature hemp_crop in a small cluster. Runs in
  parallel with the worldgen feature_rule for new chunks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 01:07:27 +01:00
Description
Minecraft Bedrock addon plugins for multi-world hub system
2.9 MiB
Languages
JavaScript 86.2%
Python 13.5%
Shell 0.3%