I'd like to inform everyone that I've figured out how to redirect the lightning. Basically, I noticed that in WorldServer.addWeatherEffect(), before sending a packet, super.addWeatherEffect() is called. So I used reflection to set World.weatherEffects to an ArrayList with the add() overridden to set the position of an Entity when it is added. I just did this on the WorldEvent.Load when the world is not remote.
I essentially added in a listener to when a lightning bolt is added to weatherEffects.
@SubscribeEvent
public static void worldLoaded(Load event) {
World world = event.getWorld();
if (!world.isRemote)
FieldAccess.set(World.class, world, "weatherEffects", new ArrayList<Entity>() {
@Override
public boolean add(Entity e) {
BlockPos pos = SearchBlocks.search(world, e.getPosition());
e.setPosition(pos.getX(), pos.getY(), pos.getZ());
FieldAccess.set(e, "effectOnly",
BlockAttributeConductive.isMetallic(world.getBlockState(pos.down())));
return super.add(e);
}
});
}