Make more complex patterns work correctly (#3847)

allow more complex patterns to work correctly
This commit is contained in:
Hannes Greule
2022-10-13 19:16:19 +02:00
committed by GitHub
parent 11dd013333
commit e244527538
2 changed files with 6 additions and 3 deletions

View File

@ -183,7 +183,11 @@ public class GenChunk extends ScopedQueueCoordinator {
@Override
public boolean setBlock(int x, int y, int z, @NonNull Pattern pattern) {
return setBlock(x, y, z, PatternUtil.apply(Preconditions.checkNotNull(pattern, "Pattern may not be null"), x, y, z));
final BaseBlock block = PatternUtil.apply(Preconditions.checkNotNull(
pattern,
"Pattern may not be null"
), x + (chunkX << 4), y, z + (chunkZ << 4));
return setBlock(x, y, z, block);
}
@Override