mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
* fix: prevent capacity overflow crash when flying with elytra or in creative mode The NoiseBasedCountPlacementModifier::get_count() can return negative i32 values when foliage noise sampling produces negative results at certain world coordinates. The previous code cast this negative i32 directly to usize, causing an integer wrap to ~18 quintillion, which triggered a capacity overflow panic in Vec allocation during chunk feature generation. This aligns with vanilla Minecraft behavior which also clamps the count to a minimum of 0 before using it. Closes #2345 * Hi