[Change] Try to prevent SingleEndPoolElement inside of the terrain (quiqueck/BetterEnd#246)

This commit is contained in:
Frank 2023-06-24 13:10:27 +02:00
parent fb194ee209
commit 2496ddf9e6

View file

@ -62,6 +62,9 @@ public class SingleEndPoolElement extends SinglePoolElement {
) { ) {
//in the end, we don't want to generate anything below y=5 //in the end, we don't want to generate anything below y=5
if (blockPos.getY() < 5) return false; if (blockPos.getY() < 5) return false;
boolean hasEmptySpace = worldGenLevel.isEmptyBlock(blockPos.above(2)) || worldGenLevel.isEmptyBlock(blockPos);
if (!hasEmptySpace)
return false;
return super.place( return super.place(
structureTemplateManager, structureTemplateManager,