mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-10 01:36:03 +00:00
Fuck bukkit's stupid classloaders
This commit is contained in:
@@ -123,6 +123,7 @@ public class IrisGenerator extends ParallaxWorldGenerator
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
random = new Random(world.getSeed());
|
||||
rTerrain = new RNG(world.getSeed());
|
||||
swirl = new CNG(rTerrain.nextParallelRNG(0), 40, 1).scale(0.007);
|
||||
@@ -390,12 +391,23 @@ public class IrisGenerator extends ParallaxWorldGenerator
|
||||
hl = hl == 0 && !t.equals(Material.AIR) ? i : hl;
|
||||
}
|
||||
|
||||
plan.setRealHeight(x, z, hl);
|
||||
plan.setRealWaterHeight(x, z, hw == 0 ? seaLevel : hw);
|
||||
plan.setBiome(x, z, biome);
|
||||
|
||||
if(!surfaceOnly)
|
||||
{
|
||||
glCaves.genCaves(wxxf, wzxf, x, z, data, plan);
|
||||
glOres.genOres(wxxf, wzxf, x, z, hl, data, plan);
|
||||
}
|
||||
|
||||
for(int i = highest; i > 0; i--)
|
||||
{
|
||||
Material t = data.getType(x, i, z);
|
||||
hw = i > seaLevel && hw == 0 && (t.equals(Material.WATER) || t.equals(Material.STATIONARY_WATER)) ? i : hw;
|
||||
hl = hl == 0 && !t.equals(Material.AIR) ? i : hl;
|
||||
}
|
||||
|
||||
plan.setRealHeight(x, z, hl);
|
||||
plan.setRealWaterHeight(x, z, hw == 0 ? seaLevel : hw);
|
||||
plan.setBiome(x, z, biome);
|
||||
|
||||
@@ -109,6 +109,11 @@ public class GenLayerBiome extends GenLayer
|
||||
return true;
|
||||
}
|
||||
|
||||
if(Borders.isBorderWithin(x, z, 7, 24D, (x + z) / 100D, (xx, zz) -> ocean.getIndex(xx, zz)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(ocean.getClosestNeighbor(x, z) > 0.2)
|
||||
{
|
||||
return true;
|
||||
@@ -119,11 +124,6 @@ public class GenLayerBiome extends GenLayer
|
||||
return true;
|
||||
}
|
||||
|
||||
if(ocean.hasBorder(3, 7, x, z) || ocean.hasBorder(3, 3, x, z))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(channel.hasBorder(3, 7, xf, zf) || channel.hasBorder(3, 3, xf, zf))
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -19,15 +19,13 @@ public class GenLayerCaves extends GenLayer
|
||||
{
|
||||
private PolygonGenerator g;
|
||||
private CNG gincline;
|
||||
private CNG gfract;
|
||||
|
||||
public GenLayerCaves(IrisGenerator iris, World world, Random random, RNG rng)
|
||||
{
|
||||
//@builder
|
||||
super(iris, world, random, rng);
|
||||
g = new PolygonGenerator(rng.nextParallelRNG(1111), 3, 0.014, 1, (c) -> c);
|
||||
g = new PolygonGenerator(rng.nextParallelRNG(1111), 3, 0.024, 8, (c) -> c);
|
||||
gincline = new CNG(rng.nextParallelRNG(1112), 1D, 3).scale(0.00652);
|
||||
gfract = new CNG(rng.nextParallelRNG(1113), 24D, 1).scale(0.0152);
|
||||
//@done
|
||||
}
|
||||
|
||||
@@ -37,22 +35,20 @@ public class GenLayerCaves extends GenLayer
|
||||
return gnoise;
|
||||
}
|
||||
|
||||
public void genCaves(double xxf, double zzf, int x, int z, AtomicChunkData data, ChunkPlan plan)
|
||||
public void genCaves(double wxxf, double wzxf, int x, int z, AtomicChunkData data, ChunkPlan plan)
|
||||
{
|
||||
PrecisionStopwatch s = PrecisionStopwatch.start();
|
||||
int wxxf = (int) (xxf + gfract.noise(xxf, zzf));
|
||||
int wzxf = (int) (zzf - gfract.noise(zzf, xxf));
|
||||
double itr = 2;
|
||||
double level = 8;
|
||||
double incline = 157;
|
||||
double baseWidth = 11;
|
||||
double drop = 35;
|
||||
double drop = 46;
|
||||
|
||||
for(double m = 1; m <= itr; m += 0.65)
|
||||
for(double m = 1; m <= itr; m += 0.45)
|
||||
{
|
||||
double w = baseWidth / m;
|
||||
|
||||
if(w < 3.5)
|
||||
if(w < 5)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ public class GenLayerCliffs extends GenLayer
|
||||
continue;
|
||||
}
|
||||
|
||||
double var = 6.2 * block;
|
||||
double var = 12.2 * block;
|
||||
double varCombined = 15.45 * block;
|
||||
double sep = (shift / 1.8D) * block;
|
||||
double height = (47 + (i * shift)) * block;
|
||||
double height = (67 + (i * shift)) * block;
|
||||
double sh = ((gen.noise(dx + dz, dz - dx) - 0.5D) * 2D) * varCombined;
|
||||
double shv = ((gen.noise(dz + dx, dx - dz) - 0.5D) * 2D) * varCombined;
|
||||
double lo = (gen.noise(dx + (i * -1000), dz + (i * 1000)) * var) + height + sh;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package ninja.bytecode.iris.generator.placer;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
import ninja.bytecode.iris.generator.IrisGenerator;
|
||||
import ninja.bytecode.iris.generator.parallax.ParallaxCache;
|
||||
|
||||
Reference in New Issue
Block a user