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