public void scheduleBlockUpdate(int par1, int par2, int par3, int par4, int par5)
    {
        NextTickListEntry var6 = new NextTickListEntry(par1, par2, par3, par4);
        byte var7 = 8;

        if (this.scheduledUpdatesAreImmediate)
        {
            if (this.checkChunksExist(var6.xCoord - var7, var6.yCoord - var7, var6.zCoord - var7, var6.xCoord + var7, var6.yCoord + var7, var6.zCoord + var7))
            {
                int var8 = this.getBlockId(var6.xCoord, var6.yCoord, var6.zCoord);

                if (var8 == var6.blockID && var8 > 0)
                {
                    Block.blocksList[var8].updateTick(this, var6.xCoord, var6.yCoord, var6.zCoord, this.rand);
                }
            }
        }
        else
        {
            if (this.checkChunksExist(par1 - var7, par2 - var7, par3 - var7, par1 + var7, par2 + var7, par3 + var7))
            {
                if (par4 > 0)
                {
                    var6.setScheduledTime((long)par5 + this.worldInfo.getWorldTime());
                }

                if (!this.scheduledTickSet.contains(var6))
                {
                    this.scheduledTickSet.add(var6);
                    this.scheduledTickTreeSet.add(var6);
                }
            }
        }
    }