mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Fix OOB exceptions for ceiling decorators
This commit is contained in:
parent
a86512e807
commit
502f7de040
@ -21,9 +21,12 @@ public class IrisCeilingDecorator extends IrisEngineDecorator
|
||||
if(decorator != null)
|
||||
{
|
||||
if(!decorator.isStacking())
|
||||
{
|
||||
if(height >= 0 || height < getEngine().getHeight())
|
||||
{
|
||||
data.set(x, height, z, decorator.getBlockData100(biome, getRng(), realX, realZ, getData()));
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
@ -35,6 +38,11 @@ public class IrisCeilingDecorator extends IrisEngineDecorator
|
||||
|
||||
for(int i = 0; i < stack; i++)
|
||||
{
|
||||
if(height - i < 0 || height - i > getEngine().getHeight())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
double threshold = (((double)i) / (double)(stack - 1));
|
||||
data.set(x, height - i, z, threshold >= decorator.getTopThreshold() ? top : fill);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user