Пример #1
0
 public WorldServer(MinecraftServer minecraftserver, ISaveHandler isavehandler, string s, int i)
     : base(isavehandler, s, (new Random()).nextLong(), WorldProvider.func_4091_a(i))
 {
     field_819_z   = false;
     field_20912_E = new MCHashTable();
     field_6160_D  = minecraftserver;
 }
Пример #2
0
 public virtual IChunkLoader func_22092_a(WorldProvider worldprovider)
 {
     if (worldprovider is WorldProviderHell)
     {
         var file = new File(field_22099_b, "DIM-1");
         file.mkdirs();
         return new ChunkLoader(file, true);
     }
     else
     {
         return new ChunkLoader(field_22099_b, true);
     }
 }
Пример #3
0
 public virtual IChunkLoader func_22092_a(WorldProvider worldprovider)
 {
     if (worldprovider is WorldProviderHell)
     {
         var file = new File(field_22099_b, "DIM-1");
         file.mkdirs();
         return(new ChunkLoader(file, true));
     }
     else
     {
         return(new ChunkLoader(field_22099_b, true));
     }
 }
Пример #4
0
 public override IChunkLoader func_22092_a(WorldProvider worldprovider)
 {
     File file = func_22097_a();
     if (worldprovider is WorldProviderHell)
     {
         var file1 = new File(file, "DIM-1");
         file1.mkdirs();
         return new McRegionChunkLoader(file1);
     }
     else
     {
         return new McRegionChunkLoader(file);
     }
 }
Пример #5
0
        public override IChunkLoader func_22092_a(WorldProvider worldprovider)
        {
            File file = func_22097_a();

            if (worldprovider is WorldProviderHell)
            {
                var file1 = new File(file, "DIM-1");
                file1.mkdirs();
                return(new McRegionChunkLoader(file1));
            }
            else
            {
                return(new McRegionChunkLoader(file));
            }
        }
Пример #6
0
        public World(ISaveHandler isavehandler, string s, long l, WorldProvider worldprovider)
        {
            scheduledUpdatesAreImmediate = false;
            field_821_y = new ArrayList();
            loadedEntityList = new ArrayList();
            unloadedEntityList = new ArrayList();
            scheduledTickTreeSet = new TreeSet();
            scheduledTickSet = new HashSet();
            loadedTileEntityList = new ArrayList();
            playerEntities = new ArrayList();
            field_6159_E = 0xffffffL;
            skylightSubtracted = 0;
            distHashCounter = (new Random()).nextInt();
            DIST_HASH_MAGIC = 0x3c6ef35f;
            editingBlocks = false;
            lockTimestamp = java.lang.System.currentTimeMillis();
            autosavePeriod = 40;
            rand = new Random();
            field_9212_p = false;
            worldAccesses = new ArrayList();
            field_9207_I = new ArrayList();
            field_4265_J = 0;
            spawnHostileMobs = true;
            spawnPeacefulMobs = true;
            activeChunkSet = new HashSet();
            ambientTickCountdown = rand.nextInt(12000);
            field_778_L = new ArrayList();
            singleplayerWorld = false;
            worldFile = isavehandler;
            worldInfo = isavehandler.func_22096_c();
            field_9212_p = worldInfo == null;
            if (worldprovider != null)
            {
                worldProvider = worldprovider;
            }
            else if (worldInfo != null && worldInfo.func_22178_h() == -1)
            {
                worldProvider = new WorldProviderHell();
            }
            else
            {
                worldProvider = new WorldProvider();
            }
            bool flag = false;
            if (worldInfo == null)
            {
                worldInfo = new WorldInfo(l, s);
                flag = true;
            }
            else
            {
                worldInfo.setLevelName(s);
            }
            worldProvider.registerWorld(this);
            chunkProvider = func_22086_b();
            if (flag)
            {
                field_9209_x = true;
                int i = 0;
                byte byte0 = 64;
                int j;
                for (j = 0; !worldProvider.canCoordinateBeSpawn(i, j); j += rand.nextInt(64) - rand.nextInt(64))
                {
                    i += rand.nextInt(64) - rand.nextInt(64);
                }

                worldInfo.setSpawnPosition(i, byte0, j);
                field_9209_x = false;
            }
            calculateInitialSkylight();
        }