Block method isIndirectlyPowered

The function isBlockIndirectlyGettingPowered(i, j, k) is used to get if a block at i,j,k and see if it's powered.

To use this function is technically part of the world methods but as this function checks a particular block, it deserves to be here :D

Here is a template that could be used. It was extracted from BlockDispenser.java and edited slightly for your convenience: public void onNeighborBlockChange(World world, int i, int j, int k, int l)//if a Neighbor Block is changed... {        if(l > 0 && Block.blocksList[l].canProvidePower)//See if the change is due to redstone... {           	world.scheduleBlockUpdate(i, j, k, this, tickRate);//If it is, run a tick of this block }    }     public void updateTick(World world, int i, int j, int k, Random random) {        if(!world.multiplayerWorld && (world.isBlockIndirectlyGettingPowered(i, j, k) || world.isBlockIndirectlyGettingPowered(i, j + 1, k))) {            //Is Powered }else{ //Not Powered }    }

This command checks if the neighboring block has changed due to a power state change and then forces this block to update. On update, this block checks is surrounding blocks to see if they are powered, and assumes if it is powered.