Parallax optimization

This commit is contained in:
Daniel Mills 2021-01-04 16:02:01 -05:00
parent 948f823744
commit 5a557e6f00

View File

@ -105,7 +105,7 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer
{ {
for(int j= z; j < z + data.getDepth(); j++) for(int j= z; j < z + data.getDepth(); j++)
{ {
for(int k = 0; k < getEngine().getHeight(); k++) for(int k = Math.max(0, meta.getMinObject()-16); k < Math.min(getEngine().getHeight(), meta.getMaxObject()+16); k++)
{ {
BlockData d = getParallaxAccess().getBlock(i, k, j); BlockData d = getParallaxAccess().getBlock(i, k, j);