mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Slabs
This commit is contained in:
parent
eb359f79cb
commit
784ef277fc
@ -419,7 +419,7 @@ public class IrisGenerator extends ParallaxWorldGenerator
|
|||||||
border++;
|
border++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(h > Iris.settings.gen.seaLevel)
|
if(h > Iris.settings.gen.seaLevel - 2)
|
||||||
{
|
{
|
||||||
above = 0;
|
above = 0;
|
||||||
below = 0;
|
below = 0;
|
||||||
@ -498,6 +498,35 @@ public class IrisGenerator extends ParallaxWorldGenerator
|
|||||||
data.setBlock(x, h, z, Material.AIR);
|
data.setBlock(x, h, z, Material.AIR);
|
||||||
plan.setRealHeight(x, z, h - 1);
|
plan.setRealHeight(x, z, h - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Slab Smoothing
|
||||||
|
else if(below == 0 && above > 0 && f == Iris.settings.gen.blockSmoothing - 1)
|
||||||
|
{
|
||||||
|
MB d = data.getMB(x, h, z);
|
||||||
|
|
||||||
|
if(d.material.equals(Material.STAINED_CLAY) && d.data == 1)
|
||||||
|
{
|
||||||
|
data.setBlock(x, h + 1, z, Material.STONE_SLAB2);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(d.material.equals(Material.SAND))
|
||||||
|
{
|
||||||
|
if(d.data == 0)
|
||||||
|
{
|
||||||
|
data.setBlock(x, h + 1, z, Material.STEP, (byte) 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(d.data == 1)
|
||||||
|
{
|
||||||
|
data.setBlock(x, h + 1, z, Material.STONE_SLAB2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(d.material.equals(Material.SNOW_BLOCK))
|
||||||
|
{
|
||||||
|
data.setBlock(x, h + 1, z, Material.SNOW, (byte) 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -536,22 +565,6 @@ public class IrisGenerator extends ParallaxWorldGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(biome.getLush() > 0.33)
|
|
||||||
{
|
|
||||||
double cnd = (1D - biome.getLush() > 1 ? 1 : biome.getLush()) / 3.5D;
|
|
||||||
double g = glSnow.getHeight(wz, wx);
|
|
||||||
|
|
||||||
if(g > cnd)
|
|
||||||
{
|
|
||||||
double gx = glSnow.getHeight(wx * 2.25, wz * 2.25);
|
|
||||||
Leaves l = new Leaves(TreeSpecies.values()[(int) (gx * (TreeSpecies.values().length - 1))]);
|
|
||||||
l.setDecaying(false);
|
|
||||||
l.setDecayable(false);
|
|
||||||
data.setBlock(x, h - 1, z, data.getMB(x, h, z));
|
|
||||||
data.setBlock(x, h, z, l.getItemType(), l.getData());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MB mbx = biome.getScatterChanceSingle(scatter(wx, h, wz));
|
MB mbx = biome.getScatterChanceSingle(scatter(wx, h, wz));
|
||||||
@ -561,6 +574,35 @@ public class IrisGenerator extends ParallaxWorldGenerator
|
|||||||
data.setBlock(x, h + 1, z, mbx.material, mbx.data);
|
data.setBlock(x, h + 1, z, mbx.material, mbx.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(biome.getLush() > 0.33)
|
||||||
|
{
|
||||||
|
double lx = (biome.getLush() > 1 ? 1 : biome.getLush()) - 0.33;
|
||||||
|
double g = glSnow.getHeight(wz, wx);
|
||||||
|
|
||||||
|
if(lx / 1.18D > g)
|
||||||
|
{
|
||||||
|
double gx = glSnow.getHeight(wx * 2.25, wz * 2.25);
|
||||||
|
double gf = glSnow.getHeight(wx * 6.25, wz * 6.25);
|
||||||
|
|
||||||
|
if(gf > gx)
|
||||||
|
{
|
||||||
|
Leaves l = new Leaves(TreeSpecies.values()[(int) (gx * (TreeSpecies.values().length - 1))]);
|
||||||
|
l.setDecaying(false);
|
||||||
|
l.setDecayable(false);
|
||||||
|
data.setBlock(x, h - 1, z, data.getMB(x, h, z));
|
||||||
|
data.setBlock(x, h, z, l.getItemType(), l.getData());
|
||||||
|
|
||||||
|
if(gf - gx > 0.2)
|
||||||
|
{
|
||||||
|
l = new Leaves(TreeSpecies.values()[(int) (gf * (TreeSpecies.values().length - 1))]);
|
||||||
|
l.setDecaying(false);
|
||||||
|
l.setDecayable(false);
|
||||||
|
data.setBlock(x, h + 1, z, l.getItemType(), l.getData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -706,7 +706,7 @@ public class GenObject
|
|||||||
{
|
{
|
||||||
SBlockVector at = new SBlockVector(i, j, k);
|
SBlockVector at = new SBlockVector(i, j, k);
|
||||||
|
|
||||||
if(M.r(factor / 20D) && getSchematic().containsKey(at) && !getSchematic().get(at).material.equals(Material.VINE))
|
if(M.r(factor / 25D) && getSchematic().containsKey(at) && !getSchematic().get(at).material.equals(Material.VINE))
|
||||||
{
|
{
|
||||||
SBlockVector a = new SBlockVector(i + 1, j, k);
|
SBlockVector a = new SBlockVector(i + 1, j, k);
|
||||||
SBlockVector b = new SBlockVector(i - 1, j, k);
|
SBlockVector b = new SBlockVector(i - 1, j, k);
|
||||||
@ -798,7 +798,7 @@ public class GenObject
|
|||||||
|
|
||||||
for(SBlockVector n : e.k())
|
for(SBlockVector n : e.k())
|
||||||
{
|
{
|
||||||
for(int g = 0; g < (factor * 1.25) * RNG.r.nextDouble(); g++)
|
for(int g = 0; g < (factor * 2) * RNG.r.nextDouble(); g++)
|
||||||
{
|
{
|
||||||
if(n.getY() - (g + 1) < minY)
|
if(n.getY() - (g + 1) < minY)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user