void EnvVariableChanged(object sender, EnvVarEventArgs e)
 {
     if (e.Var == EnvVar.EdgeBlock)
     {
         MakeTexture(ref edgeTexId, ref lastEdgeTexLoc, map.EdgeBlock);
         if (game.BlockInfo.BlocksLight[(byte)map.EdgeBlock] != fullColEdge)
         {
             ResetSidesAndEdges(null, null);
         }
     }
     else if (e.Var == EnvVar.SidesBlock)
     {
         MakeTexture(ref sideTexId, ref lastSideTexLoc, map.SidesBlock);
         if (game.BlockInfo.BlocksLight[(byte)map.SidesBlock] != fullColSides)
         {
             ResetSidesAndEdges(null, null);
         }
     }
     else if (e.Var == EnvVar.EdgeLevel)
     {
         ResetSidesAndEdges(null, null);
     }
     else if (e.Var == EnvVar.SunlightColour)
     {
         ResetSidesAndEdges(null, null);
     }
 }
 void EnvVariableChanged(object sender, EnvVarEventArgs e)
 {
     if (e.Var == EnvVar.SunlightColour || e.Var == EnvVar.ShadowlightColour)
     {
         Refresh();
     }
     else if (e.Var == EnvVar.EdgeLevel)
     {
         builder.clipLevel = Math.Max(0, game.Map.SidesHeight);
         Refresh();
     }
 }