public boolean tickUpdates(boolean par1)
    {
        int var2 = this.scheduledTickTreeSet.size();

        if (var2 != this.scheduledTickSet.size())
        {
            throw new IllegalStateException("TickNextTick list out of synch");
        }
        else
        {
            if (var2 > 1000)
            {
                var2 = 1000;
            }

            for (int var3 = 0; var3 < var2; ++var3)
            {
                NextTickListEntry var4 = (NextTickListEntry)this.scheduledTickTreeSet.first();

                if (!par1 && var4.scheduledTime > this.worldInfo.getWorldTime())
                {
                    break;
                }

                this.scheduledTickTreeSet.remove(var4);
                this.scheduledTickSet.remove(var4);
                byte var5 = 8;

                if (this.checkChunksExist(var4.xCoord - var5, var4.yCoord - var5, var4.zCoord - var5, var4.xCoord + var5, var4.yCoord + var5, var4.zCoord + var5))
                {
                    int var6 = this.getBlockId(var4.xCoord, var4.yCoord, var4.zCoord);

                    if (var6 == var4.blockID && var6 > 0)
                    {
                        Block.blocksList[var6].updateTick(this, var4.xCoord, var4.yCoord, var4.zCoord, this.rand);
                    }
                }
            }

            return this.scheduledTickTreeSet.size() != 0;
        }
    }