Fix Chorus-Plant tree type generation (#2015)

fix: chorusplant tree type must generate inside end_stone
Dieser Commit ist enthalten in:
Pierre Maurice Schwang 2022-11-14 22:58:54 +01:00 committet von GitHub
Ursprung f9527ce2b7
Commit f33d93591a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

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