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>
Two new ways to find hemp seeds without already having any:
1. Worldgen: minecraft:scatter_feature spawns 1-3 mature
silverlabs:hemp_crop blocks on grass/dirt in plains/forest/birch/
flower_forest biomes (~14% scatter chance per chunk surface pass).
2. Chest injection: 8% chance per chest first-open to plant 1-3 seeds
in a random empty slot. Tracked per-chest via world dynamic property
(rolling cap of 500 entries) so each chest only contributes once.
Bedrock has no loot-table merge mechanism so we can't add seeds to
vanilla village chests without losing their vanilla loot — script
injection sidesteps that and stays version-independent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>