Ejemplo n.º 1
0
        public WorldManager(Server server)
        {
            EnsureDirectory();

            Generator = new ChunkGenerator(this, GetSeed());
            ChunkManager = new WorldChunkManager(this);
            _Chunks = new ChunkSet();
            Server = server;

            InitializeSpawn();
            InitializeThreads();
            InitializeWeather();
        }
Ejemplo n.º 2
0
 public virtual void GenerateA(ChunkGenerator gen, WorldManager world, int x, int z, byte[] data)
 {
     int radius = field_947_a;
     rand.setSeed(world.GetSeed());
     long l = (rand.nextLong() / 2L) * 2L + 1L;
     long l1 = (rand.nextLong() / 2L) * 2L + 1L;
     for (int ix = x - radius; ix <= x + radius; ix++)
     {
         for (int iz = z - radius; iz <= z + radius; iz++)
         {
             rand.setSeed((long)ix * l + (long)iz * l1 ^ world.GetSeed());
             GenerateB(world, ix, iz, x, z, data);
         }
     }
 }
Ejemplo n.º 3
0
        public bool Load()
        {
            EnsureDirectory();

            //Event
            WorldLoadEventArgs e = new WorldLoadEventArgs(this);
            Server.PluginManager.CallEvent("WORLD_LOAD", e);
            if (e.EventCanceled) return false;
            //End Event

            Generator = new ChunkGenerator(this, GetSeed());
            ChunkManager = new WorldChunkManager(this);

            InitializeSpawn();
            InitializeThreads();
            InitializeWeather();
            return true;
        }