mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 02:03:59 +00:00
Fix decorator issues
This commit is contained in:
parent
502f7de040
commit
76041a9f55
@ -24,7 +24,10 @@ public class IrisSeaFloorDecorator extends IrisEngineDecorator
|
||||
{
|
||||
if(!decorator.isStacking())
|
||||
{
|
||||
data.set(x, height, z, decorator.getBlockData100(biome, getRng(), realX, realZ, getData()));
|
||||
if(height >= 0 || height < getEngine().getHeight())
|
||||
{
|
||||
data.set(x, height, z, decorator.getBlockData100(biome, getRng(), realX, realZ, getData()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -36,6 +39,16 @@ public class IrisSeaFloorDecorator extends IrisEngineDecorator
|
||||
|
||||
for(int i = 0; i < stack; i++)
|
||||
{
|
||||
if(height - i < 0 || height - i > getEngine().getHeight())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(height+i > getDimension().getFluidHeight())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
double threshold = ((double)i) / (stack - 1);
|
||||
data.set(x, height+i, z, threshold >= decorator.getTopThreshold() ? top : fill);
|
||||
}
|
||||
|
@ -22,8 +22,12 @@ public class IrisSeaSurfaceDecorator extends IrisEngineDecorator
|
||||
{
|
||||
if(!decorator.isStacking())
|
||||
{
|
||||
data.set(x, getDimension().getFluidHeight()+1, z, decorator.getBlockData100(biome, getRng(), realX, realZ, getData()));
|
||||
if(height >= 0 || height < getEngine().getHeight())
|
||||
{
|
||||
data.set(x, getDimension().getFluidHeight()+1, z, decorator.getBlockData100(biome, getRng(), realX, realZ, getData()));
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData());
|
||||
@ -32,6 +36,11 @@ public class IrisSeaSurfaceDecorator extends IrisEngineDecorator
|
||||
BlockData fill = decorator.getBlockData100(biome, getRng(), realX, realZ, getData());
|
||||
for(int i = 0; i < stack; i++)
|
||||
{
|
||||
if(height - i < 0 || height - i > getEngine().getHeight())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
double threshold = ((double)i) / (stack - 1);
|
||||
data.set(x, getDimension().getFluidHeight() + 1 + i, z, threshold >= decorator.getTopThreshold() ? top : fill);
|
||||
}
|
||||
|
@ -80,12 +80,17 @@ public class IrisSurfaceDecorator extends IrisEngineDecorator
|
||||
|
||||
if(bd == null)
|
||||
{
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
if(i == 0 && !underwater && !canGoOn(bd, bdx))
|
||||
{
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
if(underwater && height + 1 + i > getDimension().getFluidHeight())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
data.set(x, height+1+i, z, bd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user