Add weighted multi-material mixing for log/leaf replacement#43
Merged
tastybento merged 2 commits intodevelopfrom Apr 13, 2026
Merged
Add weighted multi-material mixing for log/leaf replacement#43tastybento merged 2 commits intodevelopfrom
tastybento merged 2 commits intodevelopfrom
Conversation
- Add MaterialWeightedPicker utility for weighted random material selection - Update Settings to use Map<String,Integer> for material fields (weight maps) - Update TreeGrowEvent to use weighted picker per-block - Add load-time validation warnings for weight maps != 100% - Update config.yml to new weighted YAML format - Update and add tests (52 total, all passing) Agent-Logs-Url: https://github.com/BentoBoxWorld/DimensionalTrees/sessions/b97d7b1d-0ada-40f7-b764-6febf71e1896 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for mixing multiple material types for logs and leaves
Add weighted multi-material mixing for log/leaf replacement
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for mixing multiple replacement materials with configurable percentage weights when trees grow in Nether/End dimensions. Each material slot (global, per-tree, per-gamemode) now accepts a
material: weightmap instead of a single string.Config format change
Weight semantics
Implementation
MaterialWeightedPicker(new) — stateless utility;pickRandom(Map<String,Integer>)handles all three cases aboveSettings— global fieldsString→Map<String,Integer>; per-tree/per-gamemodeMap<String,String>→Map<String,Map<String,Integer>>TreeGrowEvent—resolveMaterial()replaced byresolveWeights()returning a weight map;applyWeightedMaterial()picks per-block via the pickerDimensionalTrees.loadSettings()— validates all weight maps on load, emitting warnings for totals ≠ 100%