mirror of
https://github.com/BentoBoxWorld/CaveBlock.git
synced 2024-11-29 12:45:10 +01:00
Fix issue when entities populator could check position outside world bounds for roofless and floorless worlds.
This commit is contained in:
parent
a14f076c65
commit
ce6c85aef6
@ -221,6 +221,8 @@ public class EntitiesPopulator extends BlockPopulator
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (block.getY() > 1 && block.getY() < world.getMaxHeight() - 2)
|
||||||
|
{
|
||||||
Block otherBlock = world.getBlockAt(block.getX(), block.getY() + 1, block.getZ());
|
Block otherBlock = world.getBlockAt(block.getX(), block.getY() + 1, block.getZ());
|
||||||
|
|
||||||
if (!otherBlock.getType().equals(originalMaterial))
|
if (!otherBlock.getType().equals(originalMaterial))
|
||||||
@ -243,6 +245,7 @@ public class EntitiesPopulator extends BlockPopulator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
block.setType(Material.CAVE_AIR);
|
block.setType(Material.CAVE_AIR);
|
||||||
|
Loading…
Reference in New Issue
Block a user