mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 18:55:18 +00:00
Fix npe and cmod on parallax layer
This commit is contained in:
parent
2317220666
commit
8bcb3d9e0e
@ -184,16 +184,19 @@ public abstract class ParallaxTerrainProvider extends TopographicTerrainProvider
|
|||||||
return new AtomicSliverMap();
|
return new AtomicSliverMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void initGLUpdate()
|
||||||
public List<BlockPopulator> getPopulators()
|
|
||||||
{
|
{
|
||||||
List<BlockPopulator> g = new KList<>();
|
|
||||||
|
|
||||||
if(getGlUpdate() == null)
|
if(getGlUpdate() == null)
|
||||||
{
|
{
|
||||||
setGlUpdate(new GenLayerUpdate(this));
|
setGlUpdate(new GenLayerUpdate(this));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BlockPopulator> getPopulators()
|
||||||
|
{
|
||||||
|
List<BlockPopulator> g = new KList<>();
|
||||||
|
initGLUpdate();
|
||||||
g.add(getGlUpdate());
|
g.add(getGlUpdate());
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
@ -447,11 +450,21 @@ public abstract class ParallaxTerrainProvider extends TopographicTerrainProvider
|
|||||||
{
|
{
|
||||||
for(IrisStructurePlacement k : r.getStructures())
|
for(IrisStructurePlacement k : r.getStructures())
|
||||||
{
|
{
|
||||||
|
if(k == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
k.place(this, random.nextParallelRNG(2228 * 2 * g++), i, j);
|
k.place(this, random.nextParallelRNG(2228 * 2 * g++), i, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(IrisStructurePlacement k : b.getStructures())
|
for(IrisStructurePlacement k : b.getStructures())
|
||||||
{
|
{
|
||||||
|
if(k == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
k.place(this, random.nextParallelRNG(-22228 * 4 * g++), i, j);
|
k.place(this, random.nextParallelRNG(-22228 * 4 * g++), i, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user