I now got it to work by adding 1 method and updating the light renderer:
public int getLightValue(IBlockAccess world,int x,int y,int z){
TileEntityBFurnace tebf=getTileEntityaround(world,x,y,z);
if (tebf!=null){
if (tebf.isActive){
return 14;
}
}
return 0;
}
/**
* Returns one of the TileEntityBFurnace around it.
* Args: IBlockAccess,x,y,z
*/
private TileEntityBFurnace getTileEntityaround(IBlockAccess world,int x,int y,int z){
TileEntity te[]={world.getBlockTileEntity(x, y, z)
,world.getBlockTileEntity(x+1, y, z)
,world.getBlockTileEntity(x-1, y, z)
,world.getBlockTileEntity(x, y+1, z)
,world.getBlockTileEntity(x, y-1, z)
,world.getBlockTileEntity(x, y, z+1)
,world.getBlockTileEntity(x, y, z-1)};
int i=0;
while(i<te.length){
if ((te[i]!=null) && (te[i] instanceof TileEntityBFurnace)){
return (TileEntityBFurnace) te[i];
}
i++;
}
return null;
}
in my Block file, because you have to tell the light level to the blocks around it too,
and then called
this.worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
in my TileEntity on activation and deactivation
Just so everyone knows who wants to make a similar thing