Fix heightmap brush hardcoding world min and max Y

This commit is contained in:
Madeline Miller 2024-05-09 20:32:56 +10:00
parent 336c357521
commit ae61fa9fbc
No known key found for this signature in database
GPG Key ID: B8EA2E5693115D81

View File

@ -54,7 +54,7 @@ public void build(EditSession editSession, BlockVector3 position, Pattern patter
for (int offZ = -size; offZ <= size; offZ++) {
int posX = position.x() + offX;
int posZ = position.z() + offZ;
int posY = editSession.getHighestTerrainBlock(posX, posZ, 0, 255, editSession.getMask());
int posY = editSession.getHighestTerrainBlock(posX, posZ, editSession.getMinimumPoint().y(), editSession.getMaximumPoint().y(), editSession.getMask());
BlockVector3 block = BlockVector3.at(posX, posY, posZ);
if (editSession.getMask() != null && !editSession.getMask().test(block)) {
continue;