public static void RemoveLightSource(Vector3i source, Block sourceBlock) { var queue = new Queue <Block>(); var list = new ELinkedQueue <Block>(); RemoveLight(list, sourceBlock, source); GetNearbyLights(queue, list); ExpandNearbyLights(list, null); UpdateRender(queue); }
public static ELinkedList <Block> RemoveLightFromBlock(Block block, bool expand = true) { if (block.BlockLight.Sunlight == 0) { return(null); } var queue = new Queue <Block>(); var list = new ELinkedQueue <Block>(); RemoveLight(list, block, block.BlockLight.SunlightSource); GetNearbyLights(queue, list); if (expand) { ExpandNearbyLights(list, null); } UpdateRender(queue); return(list); }