Adjust spawn location coordinates for target blocks

Modified the spawnable target block location by adding 1 to the Y-coordinate. This change ensures that entities spawn above the target block, preventing them from spawning inside it or in obstructed areas.
This commit is contained in:
Teriuihi 2024-10-18 20:18:05 +02:00
parent fb2bbb70d4
commit 941b7d0d8f

View File

@ -16,7 +16,7 @@ public class SpawnableTargetBlock {
while (iter.hasNext()) { while (iter.hasNext()) {
Block block = iter.next(); Block block = iter.next();
if (isSpawnable(block)) { if (isSpawnable(block)) {
return Optional.of(block.getLocation()); return Optional.of(block.getLocation().add(0, 1, 0));
} }
} }
return Optional.empty(); return Optional.empty();