From f33d93591a7162831e30b4444525ef7632547a53 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Mon, 14 Nov 2022 22:58:54 +0100 Subject: [PATCH] Fix Chorus-Plant tree type generation (#2015) fix: chorusplant tree type must generate inside end_stone --- .../main/java/com/sk89q/worldedit/util/TreeGenerator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/TreeGenerator.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/TreeGenerator.java index 73b56b467..7d7d71e75 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/TreeGenerator.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/TreeGenerator.java @@ -150,7 +150,11 @@ public final class TreeGenerator { public boolean generate(EditSession editSession, BlockVector3 pos) throws MaxChangedBlocksException { //FAWE start - ensure canGenerateOn is called. // chorus plants have to generate starting in the end stone itself, not the air above the ground - return super.generate(editSession, pos.subtract(0, 1, 0)); + BlockVector3 down = pos.subtract(0, 1, 0); + if (!canGenerateOn(editSession.getBlockType(down.getX(), down.getY(), down.getZ()))) { + return false; + } + return editSession.getWorld().generateTree(this, editSession, down); //FAWE end }