9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-25 18:19:14 +00:00

Fix incorrect object positions

This commit is contained in:
cyberpwn
2022-09-11 21:31:21 -04:00
parent 5a24dd3b49
commit 044403b829
4 changed files with 16 additions and 8 deletions

View File

@@ -38,8 +38,10 @@ public class MantleCarvingComponent extends IrisMantleComponent {
@Override
public void generateLayer(MantleWriter writer, int x, int z, ChunkContext context) {
RNG rng = new RNG(Cache.key(x, z) + seed());
IrisRegion region = context.getRegion().get(8, 8);
IrisBiome biome = context.getBiome().get(8, 8);
int xxx = 8 + (x << 4);
int zzz = 8 + (z << 4);
IrisRegion region =getComplex().getRegionStream().get(xxx, zzz);
IrisBiome biome = getComplex().getTrueBiomeStream().get(xxx, zzz);
carve(writer, rng, x, z, region, biome);
}

View File

@@ -38,8 +38,10 @@ public class MantleFluidBodyComponent extends IrisMantleComponent {
@Override
public void generateLayer(MantleWriter writer, int x, int z, ChunkContext context) {
RNG rng = new RNG(Cache.key(x, z) + seed() + 405666);
IrisRegion region = context.getRegion().get(8, 8);
IrisBiome biome = context.getBiome().get(8, 8);
int xxx = 8 + (x << 4);
int zzz = 8 + (z << 4);
IrisRegion region =getComplex().getRegionStream().get(xxx, zzz);
IrisBiome biome = getComplex().getTrueBiomeStream().get(xxx, zzz);
generate(writer, rng, x, z, region, biome);
}

View File

@@ -49,8 +49,10 @@ public class MantleJigsawComponent extends IrisMantleComponent {
@Override
public void generateLayer(MantleWriter writer, int x, int z, ChunkContext context) {
RNG rng = new RNG(cng.fit(-Integer.MAX_VALUE, Integer.MAX_VALUE, x, z));
IrisRegion region = context.getRegion().get(8, 8);
IrisBiome biome = context.getBiome().get(8, 8);
int xxx = 8 + (x << 4);
int zzz = 8 + (z << 4);
IrisRegion region =getComplex().getRegionStream().get(xxx, zzz);
IrisBiome biome = getComplex().getTrueBiomeStream().get(xxx, zzz);
generateJigsaw(writer, rng, x, z, biome, region);
}

View File

@@ -44,8 +44,10 @@ public class MantleObjectComponent extends IrisMantleComponent {
@Override
public void generateLayer(MantleWriter writer, int x, int z, ChunkContext context) {
RNG rng = new RNG(Cache.key(x, z) + seed());
IrisRegion region = context.getRegion().get(8, 8);
IrisBiome biome = context.getBiome().get(8, 8);
int xxx = 8 + (x << 4);
int zzz = 8 + (z << 4);
IrisRegion region =getComplex().getRegionStream().get(xxx, zzz);
IrisBiome biome = getComplex().getTrueBiomeStream().get(xxx, zzz);
placeObjects(writer, rng, x, z, biome, region);
}