private void b(World world, Random random, int i, int j) {
    random.setSeed(world.getSeed());
    long k = random.nextLong();
    long l = random.nextLong();
    long i1 = (long) i * k;
    long j1 = (long) j * l;

    random.setSeed(i1 ^ j1 ^ world.getSeed());
    int k1 = i * 16 + 8 - 29;
    int l1 = j * 16 + 8 - 29;
    EnumDirection enumdirection = EnumDirectionLimit.HORIZONTAL.a(random);

    this.a.add(new WorldGenMonumentPiece1(random, k1, l1, enumdirection));
    this.c();
    this.d = true;
  }
Beispiel #2
0
 public WorldChunkManager(World var1) {
   this(var1.getSeed(), var1.getWorldData().getType());
 }
 public WorldChunkManagerCustom(World world, WorldProviderBase worldproviderbase) {
   this(world.getSeed(), world.getWorldInfo().getTerrainType(), worldproviderbase);
 }
Beispiel #4
0
  public ChunkPosition getNearestInstance(World par1World, int par2, int par3, int par4) {
    this.worldObj = par1World;
    this.rand.setSeed(par1World.getSeed());
    long var5 = this.rand.nextLong();
    long var7 = this.rand.nextLong();
    long var9 = (long) (par2 >> 4) * var5;
    long var11 = (long) (par4 >> 4) * var7;
    this.rand.setSeed(var9 ^ var11 ^ par1World.getSeed());
    this.recursiveGenerate(par1World, par2 >> 4, par4 >> 4, 0, 0, (byte[]) null);
    double var13 = Double.MAX_VALUE;
    ChunkPosition var15 = null;
    Iterator var16 = this.structureMap.values().iterator();
    ChunkPosition var19;
    int var21;
    int var20;
    double var23;
    int var22;

    while (var16.hasNext()) {
      StructureStart var17 = (StructureStart) var16.next();

      if (var17.isSizeableStructure()) {
        StructureComponent var18 = (StructureComponent) var17.getComponents().get(0);
        var19 = var18.getCenter();
        var20 = var19.x - par2;
        var21 = var19.y - par3;
        var22 = var19.z - par4;
        var23 = (double) (var20 * var20 + var21 * var21 + var22 * var22);

        if (var23 < var13) {
          var13 = var23;
          var15 = var19;
        }
      }
    }

    if (var15 != null) {
      return var15;
    } else {
      List var25 = this.getCoordList();

      if (var25 != null) {
        ChunkPosition var26 = null;
        Iterator var27 = var25.iterator();

        while (var27.hasNext()) {
          var19 = (ChunkPosition) var27.next();
          var20 = var19.x - par2;
          var21 = var19.y - par3;
          var22 = var19.z - par4;
          var23 = (double) (var20 * var20 + var21 * var21 + var22 * var22);

          if (var23 < var13) {
            var13 = var23;
            var26 = var19;
          }
        }

        return var26;
      } else {
        return null;
      }
    }
  }
Beispiel #5
0
 public WorldChunkManager(World world) {
   this.e = new NoiseGeneratorOctaves2(new Random(world.getSeed() * 9871L), 4);
   this.f = new NoiseGeneratorOctaves2(new Random(world.getSeed() * 39811L), 4);
   this.g = new NoiseGeneratorOctaves2(new Random(world.getSeed() * 543321L), 2);
 }