forked from mirrors/NBTExplorer
Fixed region boundary issue with relighting code
This commit is contained in:
parent
2adf6ced99
commit
de21e4d94c
1 changed files with 5 additions and 0 deletions
|
@ -187,6 +187,11 @@ namespace Substrate
|
|||
|
||||
public ChunkRef GetChunkRef (int lcx, int lcz, IChunkCache cache)
|
||||
{
|
||||
if (lcx < 0 || lcx >= 32 || lcz < 0 || lcz >= 32) {
|
||||
Region alt = _regionMan.GetRegion(_rx + (lcx >> 5), _rz + (lcz >> 5));
|
||||
return alt.GetChunkRef((lcx + 3200) % 32, (lcz + 3200) % 32, cache);
|
||||
}
|
||||
|
||||
ChunkKey k = new ChunkKey(lcx, lcz);
|
||||
|
||||
ChunkRef c = null;
|
||||
|
|
Loading…
Reference in a new issue