Fix Chorus-Plant tree type generation (#2015)

fix: chorusplant tree type must generate inside end_stone
This commit is contained in:
Pierre Maurice Schwang 2022-11-14 22:58:54 +01:00 committed by GitHub
parent f9527ce2b7
commit f33d93591a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}