@Override
    public void write(JmeExporter ex) throws IOException {
        super.write(ex);
        OutputCapsule oc = ex.getCapsule(this);
        oc.write(zFarOverride, "zFarOverride", 0);
        oc.write(light, "light", null);
        oc.write(fadeInfo, "fadeInfo", null);
        oc.write(fadeLength, "fadeLength", 0f);
    }
Sets the light to use to cast shadows

@param light a SpotLight
jme3-core/src/main/java/com/jme3/shadow/SpotLightShadowRenderer.java