Open
Conversation
Expand README with full documentation covering installation, configuration, permissions, and commands. Add CLAUDE.md with build commands and architecture notes for AI-assisted development. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Allows DimensionalTrees to be loaded as a Bukkit plugin directly, enabling other plugins to declare a dependency on it via plugin.yml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace Spigot API with Paper API (io.papermc.paper:paper-api:1.21.11) - Bump BentoBox to 3.14.0-SNAPSHOT - Add PaperMC and CodeMC snapshot repositories; remove Spigot repo - Update compiler plugin to 3.15.0 with fork=true for Java 21 - Update surefire to 3.5.5, add -XX:+EnableDynamicAgentLoading for Mockito - Update shade plugin to 3.6.0 (required for Java 21 class files) - Fix javadoc source tag from 17 to 21 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add junit 5.10.2, mockito 5.11.0, MockBukkit v1.21-SNAPSHOT dependencies - Add jitpack.io repository for MockBukkit snapshots - Upgrade surefire to 3.5.2 with JUnit5 includes and Java 21 --add-opens flags - Add test infrastructure: WhiteBox, TestWorldSettings, CommonTestSetup - Add DimensionalTreesTest (8 tests) covering load/enable/disable/reload - Add TreeGrowEventTest (13 tests) covering Nether/End block replacement, disabled states, invalid materials, sapling type filtering Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use Registry.MATERIAL.get(NamespacedKey.minecraft(key)) instead of the deprecated Material.matchMaterial(String). Null-safety semantics are identical so all existing null-guards are preserved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agent-Logs-Url: https://github.com/BentoBoxWorld/DimensionalTrees/sessions/cdd357be-9ce2-451f-b25a-af02251179a6 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…urations-trees Add per-tree-type material overrides for Nether and End dimensions
Agent-Logs-Url: https://github.com/BentoBoxWorld/DimensionalTrees/sessions/7215e9d0-1591-4a0e-8310-fa11a3da7001 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…ic-configurations feat: per-gamemode block configuration for Nether/End trees
- 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>
…-for-logs-leaves Add weighted multi-material mixing for log/leaf replacement
…ree and per-gamemode overrides Agent-Logs-Url: https://github.com/BentoBoxWorld/DimensionalTrees/sessions/4362988f-418f-4218-b3b8-626430c24b9e Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Agent-Logs-Url: https://github.com/BentoBoxWorld/DimensionalTrees/sessions/4362988f-418f-4218-b3b8-626430c24b9e Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
…recent-pr-changes docs: update README with new config format and features from recent PRs
There was a problem hiding this comment.
Pull request overview
Release 1.9.0 updates DimensionalTrees to support weighted/mixed block replacement (including per-tree and per-gamemode overrides), modernizes the build/dependencies, and adds a comprehensive test suite around the new behavior.
Changes:
- Replace single-material End/Nether log/leaf settings with weighted material maps plus per-tree/per-gamemode override maps.
- Add weighted material selection utility and update
TreeGrowEventto apply weighted replacements. - Modernize build (Java 21, Paper/BentoBox 3.x) and add JUnit/Mockito/MockBukkit-based tests; refresh docs and locale formatting.
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/world/bentobox/dimensionaltrees/WhiteBox.java | Adds reflection helper for tests (static private field injection). |
| src/test/java/world/bentobox/dimensionaltrees/TestWorldSettings.java | Minimal WorldSettings implementation for unit tests. |
| src/test/java/world/bentobox/dimensionaltrees/MaterialWeightedPickerTest.java | Adds unit tests validating weighted selection behavior. |
| src/test/java/world/bentobox/dimensionaltrees/events/TreeGrowEventTest.java | Adds tests for dimension gating and override resolution/replacement behavior. |
| src/test/java/world/bentobox/dimensionaltrees/DimensionalTreesTest.java | Adds tests covering addon load/reload and settings defaults. |
| src/test/java/world/bentobox/dimensionaltrees/CommonTestSetup.java | Introduces shared MockBukkit/Mockito BentoBox test harness. |
| src/main/resources/plugin.yml | Adds Bukkit plugin descriptor for Pladdon entry point. |
| src/main/resources/locales/zh-TW.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/zh-CN.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/vi.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/uk.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/tr.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/ru.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/ro.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/pt.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/pl.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/nl.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/lv.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/ko.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/ja.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/it.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/id.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/hu.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/hr.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/fr.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/es.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/en-US.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/de.yml | Switches color formatting style for locale strings. |
| src/main/resources/locales/cs.yml | Switches color formatting style for locale strings. |
| src/main/resources/config.yml | Expands config schema to weighted maps + override sections; updates defaults. |
| src/main/resources/addon.yml | Updates addon metadata (api-version/repository/authors). |
| src/main/java/world/bentobox/dimensionaltrees/Settings.java | Migrates settings to weighted maps and adds override settings. |
| src/main/java/world/bentobox/dimensionaltrees/MaterialWeightedPicker.java | Adds weighted random material picker utility. |
| src/main/java/world/bentobox/dimensionaltrees/events/TreeGrowEvent.java | Implements weighted replacement + per-tree/per-gamemode resolution and registry lookup. |
| src/main/java/world/bentobox/dimensionaltrees/DimensionalTreesPladdon.java | Adds Pladdon bootstrap class used by plugin.yml. |
| src/main/java/world/bentobox/dimensionaltrees/DimensionalTrees.java | Adds weight validation/warnings during settings load. |
| README.md | Rewrites README with detailed configuration/override documentation. |
| pom.xml | Moves to Java 21, Paper API, BentoBox 3.x, and adds test dependencies/plugins. |
| CLAUDE.md | Adds repository guidance file (needs version alignment with new build). |
| .travis.yml | Removes legacy Travis CI configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+29
to
+40
| @ConfigComment("The blocks that will be the leaves in the End.") | ||
| @ConfigComment("Each entry is a material name with a weight (percentage, 1-100).") | ||
| @ConfigComment("Weights > 100 in total are scaled proportionally.") | ||
| @ConfigComment("Weights < 100 in total fill the remainder with AIR.") | ||
| @ConfigEntry(path = "dimensionaltrees.blocks.end.leaves") | ||
| private String endLeaves = "end_stone"; | ||
| private Map<String, Integer> endLeaves = new LinkedHashMap<>(Map.of("end_stone", 100)); | ||
|
|
||
| @ConfigComment("") | ||
| @ConfigComment("The block that will be the logs on the End") | ||
| @ConfigComment("The blocks that will be the logs in the End.") | ||
| @ConfigComment("Each entry is a material name with a weight (percentage, 1-100).") | ||
| @ConfigEntry(path = "dimensionaltrees.blocks.end.logs") | ||
| private String endLogs = "purpur_block"; | ||
| private Map<String, Integer> endLogs = new LinkedHashMap<>(Map.of("purpur_block", 100)); |
Comment on lines
+103
to
+110
| private void applyWeightedMaterial(BlockState b, Map<String, Integer> weights, StructureGrowEvent e) { | ||
| String materialName = MaterialWeightedPicker.pickRandom(weights); | ||
| Material mat = Registry.MATERIAL.get(NamespacedKey.minecraft(materialName.toLowerCase(Locale.ENGLISH))); | ||
| if (mat != null) { | ||
| b.setType(mat); | ||
| } else { | ||
| warning(e); | ||
| } |
Comment on lines
+54
to
+56
| if (roll < cumulative) { | ||
| return entry.getKey().toLowerCase(); | ||
| } |
Comment on lines
+216
to
+219
| protected static void deleteAll(File file) throws IOException { | ||
| if (file.exists()) { | ||
| Files.walk(file.toPath()).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete); | ||
| } |
|
|
||
| # Warning to invalid blocks on config file | ||
| # Warning for invalid blocks in config file | ||
| invalid: "§cCan't grow the tree. A invalid material has been detected." |
Comment on lines
+48
to
+50
| - **Spigot API 1.21.3** — Minecraft server API (provided scope) | ||
| - **BentoBox 2.7.1** — Addon framework (provided scope) | ||
| - **Java 17** |
Comment on lines
3
to
+6
| version: ${version}${build.number} | ||
| icon: DARK_OAK_SAPLING | ||
| api-version: 3.12.0 | ||
| repository: "BentoBoxWorld/DimensionalTrees" |
| * <li>If weights sum to more than 100 the weights are scaled proportionally so that no | ||
| * AIR is injected.</li> | ||
| * <li>If weights sum to less than 100 the remaining percentage is filled with | ||
| * {@code "air"} (i.e. the block is left as-is or replaced by air).</li> |
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.
No description provided.