Skip to content

Fix UOE when using generateTree with pale oak#12616

Merged
Owen1212055 merged 1 commit into
PaperMC:mainfrom
Warriorrrr:fix/pale-oak-generatetree-uoe
Jun 7, 2025
Merged

Fix UOE when using generateTree with pale oak#12616
Owen1212055 merged 1 commit into
PaperMC:mainfrom
Warriorrrr:fix/pale-oak-generatetree-uoe

Conversation

@Warriorrrr
Copy link
Copy Markdown
Member

Fixes an UOE error when the consumer/predicate generateTree methods are used with the pale oak tree type. I'm not sure if there's something inherently wrong with implementing getLevel here, but otherwise it could be fixed by passing only the generator along to the PaleMossDecorator.

java.lang.UnsupportedOperationException: Not supported yet.
	at org.bukkit.craftbukkit.util.DummyGeneratorAccess.getLevel(DummyGeneratorAccess.java:58) ~[main/:?]
	at net.minecraft.world.level.levelgen.feature.treedecorators.PaleMossDecorator.lambda$place$6(PaleMossDecorator.java:61) ~[main/:?]
	at java.base/java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
	at net.minecraft.world.level.levelgen.feature.treedecorators.PaleMossDecorator.place(PaleMossDecorator.java:59) ~[main/:?]
	at net.minecraft.world.level.levelgen.feature.TreeFeature.lambda$place$8(TreeFeature.java:155) ~[main/:?]
	at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at net.minecraft.world.level.levelgen.feature.TreeFeature.place(TreeFeature.java:155) ~[main/:?]
	at net.minecraft.world.level.levelgen.feature.Feature.place(Feature.java:192) ~[main/:?]
	at net.minecraft.world.level.levelgen.feature.ConfiguredFeature.place(ConfiguredFeature.java:25) ~[main/:?]
	at org.bukkit.craftbukkit.CraftRegionAccessor.generateTree(CraftRegionAccessor.java:291) ~[main/:?]
	at org.bukkit.craftbukkit.CraftRegionAccessor.generateTree(CraftRegionAccessor.java:200) ~[main/:?]

@Warriorrrr Warriorrrr requested a review from a team as a code owner June 1, 2025 11:23
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jun 1, 2025
@github-project-automation github-project-automation Bot moved this from Awaiting review to Awaiting final testing in Paper PR Queue Jun 1, 2025
@Owen1212055 Owen1212055 merged commit e87320d into PaperMC:main Jun 7, 2025
4 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting final testing to Merged in Paper PR Queue Jun 7, 2025
@Warriorrrr Warriorrrr deleted the fix/pale-oak-generatetree-uoe branch June 7, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants